mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 06:05:39 +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'
|
complete -c ack -l bar -d 'The warning admiral'
|
||||||
|
|
||||||
# File types
|
# File types
|
||||||
|
if type ack > /dev/null
|
||||||
for type in (ack --dump | perl -lne 'print $1 if /^\s+--type-add=([^:]+)/' | uniq)
|
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 $type -d "Allow $type file type"
|
||||||
complete -c ack -l no$type -l no-$type -d "Don't allow $type file type"
|
complete -c ack -l no$type -l no-$type -d "Don't allow $type file type"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user