mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08:00
Make ack completion not spew to stderr if ack is not installed
This commit is contained in:
parent
be9024767e
commit
f7708955b6
|
@ -83,7 +83,9 @@ complete -c ack -l thpppt -d 'Bill the Cat'
|
|||
complete -c ack -l bar -d 'The warning admiral'
|
||||
|
||||
# File types
|
||||
for type in (ack --dump | perl -lne 'print $1 if /^\s+--type-add=([^:]+)/' | uniq)
|
||||
if type ack > /dev/null
|
||||
for type in (ack --dump | perl -lne 'print $1 if /^\s+--type-add=([^:]+)/' | uniq)
|
||||
complete -c ack -l $type -d "Allow $type file type"
|
||||
complete -c ack -l no$type -l no-$type -d "Don't allow $type file type"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user