mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix git push REMOTE :BRANCH
completion
The `string match` was limiting it to `git push REMOTE :<TAB>` and would fail for `git push REMOTE :x<TAB>`. Now working as expected.
This commit is contained in:
parent
ea897fcc0f
commit
d11f9f7148
1 changed files with 1 additions and 1 deletions
|
@ -833,7 +833,7 @@ complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_
|
||||||
# The "refspec" here is an optional "+" to signify a force-push
|
# The "refspec" here is an optional "+" to signify a force-push
|
||||||
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q "+*" -- (commandline -ct)' -a '+(__fish_git_branches)' -d 'Force-push branch'
|
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q "+*" -- (commandline -ct)' -a '+(__fish_git_branches)' -d 'Force-push branch'
|
||||||
# git push REMOTE :BRANCH deletes BRANCH on remote REMOTE
|
# git push REMOTE :BRANCH deletes BRANCH on remote REMOTE
|
||||||
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q ":" -- (commandline -ct)' -a '(__fish_git_branch_for_remote_delete)' -d 'Delete remote branch'
|
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q ":*" -- (commandline -ct)' -a '(__fish_git_branch_for_remote_delete)' -d 'Delete remote branch'
|
||||||
# then src:dest (where both src and dest are git objects, so we want to complete branches)
|
# then src:dest (where both src and dest are git objects, so we want to complete branches)
|
||||||
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q "+*:*" -- (commandline -ct)' -a '+(__fish_git_branches):(__fish_git_branch_for_remote)' -d 'Force-push local branch to remote branch'
|
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q "+*:*" -- (commandline -ct)' -a '+(__fish_git_branches):(__fish_git_branch_for_remote)' -d 'Force-push local branch to remote branch'
|
||||||
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q "*:*" -- (commandline -ct)' -a '(__fish_git_branches):(__fish_git_branch_for_remote)' -d 'Push local branch to remote branch'
|
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q "*:*" -- (commandline -ct)' -a '(__fish_git_branches):(__fish_git_branch_for_remote)' -d 'Push local branch to remote branch'
|
||||||
|
|
Loading…
Reference in a new issue