mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 21:18:53 +00:00
Move make completion to string
This also removes a hack that's not needed anymore
This commit is contained in:
parent
45bf843b03
commit
65415cb761
1 changed files with 4 additions and 8 deletions
|
@ -1,13 +1,9 @@
|
||||||
# Completions for make
|
# Completions for make
|
||||||
|
|
||||||
# This completion is a bit ugly. It reenables file completion on
|
# This completion reenables file completion on
|
||||||
# assignments, so e.g. 'make foo FILES=<tab>' will recive standard
|
# assignments, so e.g. 'make foo FILES=<tab>' will receive standard
|
||||||
# filename completion. Unfortunatly, this turns out to be a bit
|
# filename completion.
|
||||||
# complicated to do.
|
complete -c make -n 'commandline -ct | string match "*=*"'
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
complete -x -c make -a "(__fish_print_make_targets)" --description "Target"
|
complete -x -c make -a "(__fish_print_make_targets)" --description "Target"
|
||||||
complete -r -c make -s f --description "Use file as makefile" -r
|
complete -r -c make -s f --description "Use file as makefile" -r
|
||||||
|
|
Loading…
Reference in a new issue