aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/completions/make.fish
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2015-09-29 21:09:52 +0200
committerGravatar Fabian Homborg <FHomborg@gmail.com>2015-10-04 15:41:20 +0200
commit65415cb761803e58d88e7cdf171586de5c7f64b1 (patch)
treef34dec43bfd3acac453290f1f2da413c1fd1aaa6 /share/completions/make.fish
parent45bf843b03c4c2bdf5946233858a529554152c8b (diff)
Move make completion to `string`
This also removes a hack that's not needed anymore
Diffstat (limited to 'share/completions/make.fish')
-rw-r--r--share/completions/make.fish12
1 files changed, 4 insertions, 8 deletions
diff --git a/share/completions/make.fish b/share/completions/make.fish
index 72f88c92..dbebb409 100644
--- a/share/completions/make.fish
+++ b/share/completions/make.fish
@@ -1,13 +1,9 @@
# Completions for make
-# This completion is a bit ugly. It reenables file completion on
-# assignments, so e.g. 'make foo FILES=<tab>' will recive standard
-# filename completion. Unfortunatly, this turns out to be a bit
-# complicated to do.
-
-set -l is_assignment "commandline -ct| __fish_sgrep '..*='"
-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
+# This completion reenables file completion on
+# assignments, so e.g. 'make foo FILES=<tab>' will receive standard
+# filename completion.
+complete -c make -n 'commandline -ct | string match "*=*"'
complete -x -c make -a "(__fish_print_make_targets)" --description "Target"
complete -r -c make -s f --description "Use file as makefile" -r