Replace all internal uses of grep with sgrep, which is a wrapper around grep that strips away any GREP_OPTIONS. This is needed to avoid users who have added arbitrary switches to GREP_OPTIONS, thus changing its behaviour.

darcs-hash:20061129140004-ac50b-485ff6bfd71e9459ba62461f6e093ca5c9ddd664.gz
This commit is contained in:
axel
2006-11-30 00:00:04 +10:00
parent 32502bfac8
commit f64364cced
25 changed files with 46 additions and 44 deletions

View File

@@ -2,7 +2,7 @@
function __fish_print_make_targets
set files Makefile makefile GNUmakefile
grep -h -E '^[^#%=$[:space:]][^#%=$]*:([^=]|$)' $files | cut -d ":" -f 1 | sed -e 's/^ *//;s/ *$//;s/ */\n/g' ^/dev/null
sgrep -h -E '^[^#%=$[:space:]][^#%=$]*:([^=]|$)' $files | cut -d ":" -f 1 | sed -e 's/^ *//;s/ *$//;s/ */\n/g' ^/dev/null
end
# This completion is a bit ugly. It reenables file completion on
@@ -10,7 +10,7 @@ end
# filename completion. Unfortunatly, this turns out to be a bit
# complicated to do.
set -l is_assignment "commandline -ct|grep '..*='"
set -l is_assignment "commandline -ct|sgrep '..*='"
set -l complete_file_assignment '(commandline -ct)(complete --do-complete=this_command_does_not_exist\ (commandline -ct|sed -e \'s/.*=//\'))'
complete -c make --condition $is_assignment -a $complete_file_assignment