Fix make command completion. Fixes issue #928.

Previously, TAB on make CC=/us caused CC=/us/usr/ to appear. This
commit fixes this, by properly removing part after equals sign.
This commit is contained in:
Konrad Borowski 2013-07-25 15:05:09 +02:00
parent f9c2a77c67
commit 222e36ee3e

View file

@ -6,7 +6,7 @@
# complicated to do. # complicated to do.
set -l is_assignment "commandline -ct|sgrep '..*='" 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/.*=//\'))' set -l complete_file_assignment '(commandline -ct|sed -e \'s/=.*/=/\')(complete --do-complete=this_command_does_not_exist\ (commandline -ct|sed -e \'s/.*=//\'))'
complete -c make --condition $is_assignment -a $complete_file_assignment complete -c make --condition $is_assignment -a $complete_file_assignment
complete -x -c make -a "(__fish_print_make_targets)" --description "Target" complete -x -c make -a "(__fish_print_make_targets)" --description "Target"