Move mkae completion function to its own file

darcs-hash:20070921210401-75c98-6b303317ba375f0c6402e81902e599e79a9c06ed.gz
This commit is contained in:
liljencrantz 2007-09-22 07:04:01 +10:00
parent 06de2602cb
commit dab7e6c7b9
2 changed files with 4 additions and 5 deletions

View File

@ -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=<tab>' will recive standard
# filename completion. Unfortunatly, this turns out to be a bit

View File

@ -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