mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Suggest unique remote branches for git-switch
From the `git-switch` documentation: If <branch> is not found but there does exist a tracking branch in exactly one remote (call it <remote>) with a matching name, treat as equivalent to $ git switch -c <branch> --track <remote>/<branch>
This commit is contained in:
parent
afd8fc3cdf
commit
012773436e
1 changed files with 1 additions and 0 deletions
|
@ -1534,6 +1534,7 @@ complete -f -c git -n '__fish_git_using_command restore; and __fish_contains_opt
|
|||
# switch options
|
||||
complete -f -c git -n '__fish_git_needs_command' -a switch -d 'Switch to a branch'
|
||||
complete -k -f -c git -n '__fish_git_using_command switch' -a '(__fish_git_branches)'
|
||||
complete -k -f -c git -n '__fish_git_using_command switch' -a '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch'
|
||||
complete -f -c git -n '__fish_git_using_command switch' -r -s c -l create -d 'Create a new branch'
|
||||
complete -f -c git -n '__fish_git_using_command switch' -r -s C -l force-create -d 'Force create a new branch'
|
||||
complete -f -c git -n '__fish_git_using_command switch' -s d -l detach -d 'Switch to a commit for inspection and discardable experiment'
|
||||
|
|
Loading…
Reference in a new issue