зеркало из https://github.com/mislav/hub.git
59 строки
3.9 KiB
Plaintext
59 строки
3.9 KiB
Plaintext
function __fish_hub_needs_command
|
|
set cmd (commandline -opc)
|
|
if [ (count $cmd) -eq 1 ]
|
|
return 0
|
|
else
|
|
return 1
|
|
end
|
|
end
|
|
|
|
function __fish_hub_using_command
|
|
set cmd (commandline -opc)
|
|
if [ (count $cmd) -gt 1 ]
|
|
if [ $argv[1] = $cmd[2] ]
|
|
return 0
|
|
end
|
|
end
|
|
return 1
|
|
end
|
|
|
|
complete -f -c hub -n '__fish_hub_needs_command' -a alias -d "show shell instructions for wrapping git"
|
|
complete -f -c hub -n '__fish_hub_needs_command' -a browse -d "browse the project on GitHub"
|
|
complete -f -c hub -n '__fish_hub_needs_command' -a compare -d "lookup commit in GitHub Status API"
|
|
complete -f -c hub -n '__fish_hub_needs_command' -a create -d "create new repo on GitHub for the current project"
|
|
complete -f -c hub -n '__fish_hub_needs_command' -a fork -d "fork origin repo on GitHub"
|
|
complete -f -c hub -n '__fish_hub_needs_command' -a pull-request -d "open a pull request on GitHub"
|
|
|
|
# alias
|
|
complete -f -c hub -n ' __fish_hub_using_command alias' -a 'bash zsh sh ksh csh fish' -d "output shell script suitable for eval"
|
|
# pull-request
|
|
complete -f -c hub -n ' __fish_hub_using_command pull-request' -s f -d "Skip the check for unpushed commits"
|
|
complete -f -c hub -n ' __fish_hub_using_command pull-request' -s -m -d "Use the first line of <MESSAGE> as pull request title, and the rest as pull request description"
|
|
complete -f -c hub -n ' __fish_hub_using_command pull-request' -s F -d "Read the pull request title and description from <FILE>"
|
|
complete -f -c hub -n ' __fish_hub_using_command pull-request' -s o -d "Open the new pull request in a web browser"
|
|
complete -f -c hub -n ' __fish_hub_using_command pull-request' -l browse -d "Open the new pull request in a web browser"
|
|
complete -f -c hub -n ' __fish_hub_using_command pull-request' -s p -d "Push the current branch to <HEAD> before creating the pull request"
|
|
complete -f -c hub -n ' __fish_hub_using_command pull-request' -s b -d 'The base branch in "[OWNER:]BRANCH" format'
|
|
complete -f -c hub -n ' __fish_hub_using_command pull-request' -s h -d 'The head branch in "[OWNER:]BRANCH" format'
|
|
complete -f -c hub -n ' __fish_hub_using_command pull-request' -s a -d 'A comma-separated list of GitHub handles to assign to this pull request'
|
|
complete -f -c hub -n ' __fish_hub_using_command pull-request' -s M -d "Add this pull request to a GitHub milestone with id <ID>"
|
|
complete -f -c hub -n ' __fish_hub_using_command pull-request' -s l -d "Add a comma-separated list of labels to this pull request"
|
|
# fork
|
|
complete -f -c hub -n ' __fish_hub_using_command fork' -l no-remote -d "Skip adding a git remote for the fork"
|
|
# browse
|
|
complete -f -c hub -n ' __fish_hub_using_command browse' -s u -d "Print the URL instead of opening it"
|
|
complete -f -c hub -n ' __fish_hub_using_command browse' -s c -d "Put the URL in clipboard instead of opening it"
|
|
complete -f -c hub -n ' __fish_hub_using_command browse' -a '-- commits' -d 'commits'
|
|
complete -f -c hub -n ' __fish_hub_using_command browse' -a '-- contributors' -d 'contributors'
|
|
complete -f -c hub -n ' __fish_hub_using_command browse' -a '-- issues' -d 'issues'
|
|
complete -f -c hub -n ' __fish_hub_using_command browse' -a '-- pulls' -d 'pull requests'
|
|
complete -f -c hub -n ' __fish_hub_using_command browse' -a '-- wiki' -d 'wiki'
|
|
# compare
|
|
complete -f -c hub -n ' __fish_hub_using_command compare' -s u -d 'Print the URL instead of opening it'
|
|
# create
|
|
complete -f -c hub -n ' __fish_hub_using_command create' -s o -d "Open the new repository in a web browser"
|
|
complete -f -c hub -n ' __fish_hub_using_command create' -l browse -d "Open the new repository in a web browser"
|
|
complete -f -c hub -n ' __fish_hub_using_command create' -s p -d "Create a private repository"
|
|
complete -f -c hub -n ' __fish_hub_using_command create' -s c -d "Put the URL of the new repository to clipboard instead of printing it."
|
|
complete -f -c hub -n ' __fish_hub_using_command create' -l copy -d "Put the URL of the new repository to clipboard instead of printing it."
|