# shellcheck shell=dash
___x_cmd_gx_ws_pull(){
    local X_help_cmd='___x_cmd_gx_help ws pull'
    help:arg:parse
    [ $# -gt 0 ] ||     set -- current

    local op="$1";      shift
    case "$op" in
        current)                            ___x_cmd_gx_ws_pull_current        ;;
        origin)                             ___x_cmd_gx_ws_pull_origin         ;;
        *)                                  ___x_cmd_gx_ws_pull_current        ;;
    esac
}

___x_cmd_gx_ws_pull_current(){
    local x_
    ___x_cmd_gx_ws_branch_current_ || return
    command git pull origin "$x_"

}

___x_cmd_gx_ws_pull_origin(){
    local x_
    ___x_cmd_gx_ws_branch_origin_ || return
    local origin= ; local branch=;
    origin="${x_%%/*}"
    branch="${x_##*/}"
    command git pull "${origin} " "${branch}"

}


___x_cmd_gx_ws_push(){
    local X_help_cmd='___x_cmd_gx_help ws push'
    help:arg:parse
    [ $# -gt 0 ] ||     set -- update
    
    command git add .
    command git commit -m "$*"

    local x_
    ___x_cmd_gx_ws_branch_current_ || return
    command git push origin "$x_"
}


