mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 03:51:14 -03:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user