cloudMux
gitlabCross-shell GitHub, Google Cloud, and Azure CLI shortcuts for Termux and desktop Linux.
clone
https://gitlab.com/bitzzdev/cloudMux.gitazure-clibashclicloud-toolsgcloudgh-cliproductivityshell-scriptstermuxzsh
function cloudmux_hascommand -q $argv[1]endfunction cloudmux_requireif not cloudmux_has $argv[1]printf '%s is not installed or is not on PATH.\n' $argv[1] >&2return 127endendfunction cloudmux_rowprintf '%-22s | %-38s | %s\n' $argv[1] $argv[2] $argv[3]endfunction cloudmux_headerset_color cyanprintf '%-22s | %-38s | %s\n' 'Alias / Function Name' 'Full Command Executed' 'One-line Description'set_color normalprintf '%s\n' '-----------------------+----------------------------------------+------------------------------'endfunction gh-whocloudmux_require gh; or returngh auth status $argvendfunction gh-incloudmux_require gh; or returngh auth login $argvendfunction gh-repo-lscloudmux_require gh; or returnset -l owner ''set -l limit 20test (count $argv) -ge 1; and set owner $argv[1]test (count $argv) -ge 2; and set limit $argv[2]gh repo list $owner --limit $limitendfunction gh-clonecloudmux_require gh; or returntest (count $argv) -ge 1; or begin; printf 'Usage: gh-clone <repo> [directory]\n' >&2; return 2; endgh repo clone $argvendfunction gh-forkcloudmux_require gh; or returntest (count $argv) -ge 1; or begin; printf 'Usage: gh-fork <repo> [--clone]\n' >&2; return 2; endgh repo fork $argvendfunction gh-createcloudmux_require gh; or returngh repo create $argvendfunction gh-pr-ls; cloudmux_require gh; or return; gh pr list $argv; endfunction gh-pr-view; cloudmux_require gh; or return; gh pr view $argv; endfunction gh-pr-cocloudmux_require gh; or returntest (count $argv) -eq 1; or begin; printf 'Usage: gh-pr-co <num>\n' >&2; return 2; endgh pr checkout $argv[1]endfunction gh-pr-diff; cloudmux_require gh; or return; gh pr diff $argv; endfunction gh-pr-merge; cloudmux_require gh; or return; gh pr merge $argv; endfunction gh-issue-ls; cloudmux_require gh; or return; gh issue list $argv; endfunction gh-issue-create; cloudmux_require gh; or return; gh issue create $argv; endfunction gh-issue-view; cloudmux_require gh; or return; gh issue view $argv; endfunction gh-cs-ls; cloudmux_require gh; or return; gh codespace list $argv; endfunction gh-cs-sshcloudmux_require gh; or returntest (count $argv) -eq 1; or begin; printf 'Usage: gh-cs-ssh <codespace>\n' >&2; return 2; endgh codespace ssh -c $argv[1]endfunction gh-run-ls; cloudmux_require gh; or return; gh run list $argv; endfunction gh-run-watchcloudmux_require gh; or returntest (count $argv) -eq 1; or begin; printf 'Usage: gh-run-watch <run-id>\n' >&2; return 2; endgh run watch $argv[1]endfunction gh-helpcloudmux_headercloudmux_row gh-who 'gh auth status' 'Show GitHub authentication status'cloudmux_row gh-in 'gh auth login' 'Authenticate with GitHub'cloudmux_row gh-repo-ls 'gh repo list' 'List repositories'cloudmux_row gh-clone 'gh repo clone <repo>' 'Clone a repository'cloudmux_row gh-fork 'gh repo fork <repo>' 'Fork a repository'cloudmux_row gh-create 'gh repo create' 'Create a repository'cloudmux_row gh-pr-ls 'gh pr list' 'List pull requests'cloudmux_row gh-pr-view 'gh pr view [num]' 'View a pull request'cloudmux_row gh-pr-co 'gh pr checkout <num>' 'Check out a pull request'cloudmux_row gh-pr-diff 'gh pr diff [num]' 'Show pull request changes'cloudmux_row gh-pr-merge 'gh pr merge [num]' 'Merge a pull request'cloudmux_row gh-issue-ls 'gh issue list' 'List issues'cloudmux_row gh-issue-create 'gh issue create' 'Create an issue'cloudmux_row gh-issue-view 'gh issue view [num]' 'View an issue'cloudmux_row gh-cs-ls 'gh codespace list' 'List Codespaces'cloudmux_row gh-cs-ssh 'gh codespace ssh -c <name>' 'Connect to a Codespace'cloudmux_row gh-run-ls 'gh run list' 'List workflow runs'cloudmux_row gh-run-watch 'gh run watch <id>' 'Watch a workflow run'end