mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 11:35:00 +08:00
completions/git: Complete git restore -S
This used `contains`. Let's just use `__fish_contains_opt` and pass the short option as well. See #8843.
This commit is contained in:
parent
71a6f979a5
commit
51b663787f
@ -1778,8 +1778,8 @@ complete -f -c git -n '__fish_git_using_command restore' -l ignore-unmerged -d '
|
||||
complete -f -c git -n '__fish_git_using_command restore' -l ignore-skip-worktree-bits -d 'Ignore the sparse-checkout file and unconditionally restore any files in <pathspec>'
|
||||
complete -f -c git -n '__fish_git_using_command restore' -l overlay -d 'Never remove files when restoring'
|
||||
complete -f -c git -n '__fish_git_using_command restore' -l no-overlay -d 'Remove files when restoring (default)'
|
||||
complete -f -c git -n '__fish_git_using_command restore; and not contains -- --staged (commandline -opc)' -a '(__fish_git_files modified deleted modified-staged-deleted unmerged)'
|
||||
complete -f -c git -n '__fish_git_using_command restore; and contains -- --staged (commandline -opc)' -a '(__fish_git_files added modified-staged deleted-staged renamed copied)'
|
||||
complete -f -c git -n '__fish_git_using_command restore; and not __fish_contains_opt -s S staged' -a '(__fish_git_files modified deleted modified-staged-deleted unmerged)'
|
||||
complete -f -c git -n '__fish_git_using_command restore; and __fish_contains_opt -s S staged' -a '(__fish_git_files added modified-staged deleted-staged renamed copied)'
|
||||
complete -F -c git -n '__fish_git_using_command restore; and __fish_contains_opt -s s source'
|
||||
# switch options
|
||||
complete -f -c git -n __fish_git_needs_command -a switch -d 'Switch to a branch'
|
||||
|
Loading…
x
Reference in New Issue
Block a user