mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 15:37:24 +00:00
Merge branch 'completions-git-add' of git://github.com/phisto/fish-shell into phisto-completions-git-add
Conflicts: share/completions/git.fish
This commit is contained in:
commit
ee7339b661
1 changed files with 6 additions and 0 deletions
|
@ -18,6 +18,10 @@ function __fish_git_remotes
|
|||
command git remote
|
||||
end
|
||||
|
||||
function __fish_git_modified_files
|
||||
command git status -s | grep -e "^ M" | sed "s/^ M //"
|
||||
end
|
||||
|
||||
function __fish_git_ranges
|
||||
set -l from (commandline -ot | perl -ne 'if (index($_, "..") > 0) { my @parts = split(/\.\./); print $parts[0]; }')
|
||||
if test -z "$from"
|
||||
|
@ -105,6 +109,8 @@ complete -c git -n '__fish_git_using_command add' -s N -l intent-to-add -d 'Reco
|
|||
complete -c git -n '__fish_git_using_command add' -l refresh -d "Don't add the file(s), but only refresh their stat"
|
||||
complete -c git -n '__fish_git_using_command add' -l ignore-errors -d 'Ignore errors'
|
||||
complete -c git -n '__fish_git_using_command add' -l ignore-missing -d 'Check if any of the given files would be ignored'
|
||||
complete -f -c git -n '__fish_git_using_command add; and __fish_contains_opt -s p patch' -a '(__fish_git_modified_files)'
|
||||
# TODO options
|
||||
|
||||
### checkout
|
||||
complete -f -c git -n '__fish_git_needs_command' -a checkout -d 'Checkout and switch to a branch'
|
||||
|
|
Loading…
Reference in a new issue