diff --git a/share/completions/make.fish b/share/completions/make.fish index ee32172d0..0c89d52a2 100644 --- a/share/completions/make.fish +++ b/share/completions/make.fish @@ -1,10 +1,5 @@ # Completions for make -function __fish_print_make_targets - set files Makefile makefile GNUmakefile - 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 # assignments, so e.g. 'make foo FILES=' will recive standard # filename completion. Unfortunatly, this turns out to be a bit diff --git a/share/functions/__fish_print_make_targets.fish b/share/functions/__fish_print_make_targets.fish new file mode 100644 index 000000000..c57e88713 --- /dev/null +++ b/share/functions/__fish_print_make_targets.fish @@ -0,0 +1,4 @@ +function __fish_print_make_targets + set files Makefile makefile GNUmakefile + sgrep -h -E '^[^#%=$[:space:]][^#%=$]*:([^=]|$)' $files | cut -d ":" -f 1 | sed -e 's/^ *//;s/ *$//;s/ */\n/g' ^/dev/null +end