From dab7e6c7b98825879cc03016113b31b575f3f7af Mon Sep 17 00:00:00 2001 From: liljencrantz Date: Sat, 22 Sep 2007 07:04:01 +1000 Subject: [PATCH] Move mkae completion function to its own file darcs-hash:20070921210401-75c98-6b303317ba375f0c6402e81902e599e79a9c06ed.gz --- share/completions/make.fish | 5 ----- share/functions/__fish_print_make_targets.fish | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 share/functions/__fish_print_make_targets.fish 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