aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/completions/git.fish
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2015-09-09 20:55:04 +0200
committerGravatar Fabian Homborg <FHomborg@gmail.com>2015-09-09 20:55:04 +0200
commitb85a8bbbfed56f603dca5d6da85858f9c973b669 (patch)
treeaaca0722b25cff9d5e2ea5b46ad6e7dc59d9ec6d /share/completions/git.fish
parent925f4517739ed564edcac6dd5ed29c2835461da9 (diff)
Rename sgrep to __fish_sgrep
Makes it harder to cause issues with aliases, see fish-shell#2245
Diffstat (limited to 'share/completions/git.fish')
-rw-r--r--share/completions/git.fish8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/completions/git.fish b/share/completions/git.fish
index 4008d486..a2122851 100644
--- a/share/completions/git.fish
+++ b/share/completions/git.fish
@@ -2,7 +2,7 @@
# Use 'command git' to avoid interactions for aliases from git to (e.g.) hub
function __fish_git_branches
- command git branch --no-color -a ^/dev/null | sgrep -v ' -> ' | sed -e 's/^..//' -e 's/^remotes\///'
+ command git branch --no-color -a ^/dev/null | __fish_sgrep -v ' -> ' | sed -e 's/^..//' -e 's/^remotes\///'
end
function __fish_git_tags
@@ -38,8 +38,8 @@ function __fish_git_ranges
end
set -l to (commandline -ot | perl -ne 'if (index($_, "..") > 0) { my @parts = split(/\.\./); print $parts[1]; }')
- for from_ref in (__fish_git_heads | sgrep -e "$from")
- for to_ref in (__fish_git_heads | sgrep -e "$to")
+ for from_ref in (__fish_git_heads | __fish_sgrep -e "$from")
+ for to_ref in (__fish_git_heads | __fish_sgrep -e "$to")
printf "%s..%s\n" $from_ref $to_ref
end
end
@@ -391,7 +391,7 @@ complete -f -c git -n '__fish_git_using_command status' -l ignore-submodules -x
### tag
complete -f -c git -n '__fish_git_needs_command' -a tag -d 'Create, list, delete or verify a tag object signed with GPG'
-complete -f -c git -n '__fish_git_using_command tag; and __fish_not_contain_opt -s d; and __fish_not_contain_opt -s v; and test (count (commandline -opc | sgrep -v -e \'^-\')) -eq 3' -a '(__fish_git_branches)' -d 'Branch'
+complete -f -c git -n '__fish_git_using_command tag; and __fish_not_contain_opt -s d; and __fish_not_contain_opt -s v; and test (count (commandline -opc | __fish_sgrep -v -e \'^-\')) -eq 3' -a '(__fish_git_branches)' -d 'Branch'
complete -f -c git -n '__fish_git_using_command tag' -s a -l annotate -d 'Make an unsigned, annotated tag object'
complete -f -c git -n '__fish_git_using_command tag' -s s -l sign -d 'Make a GPG-signed tag'
complete -f -c git -n '__fish_git_using_command tag' -s d -l delete -d 'Remove a tag'