mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
Try to make Valgrind completion not complain if valgrind is not installed
This commit is contained in:
parent
4683ce2771
commit
ea8c6bc15e
1 changed files with 5 additions and 5 deletions
|
@ -1,12 +1,12 @@
|
||||||
set -l skin
|
# Don't go invoking valgrind unless it is installed
|
||||||
if valgrind --version | sgrep -- '-2\.[012]\.' >/dev/null ^/dev/null
|
|
||||||
|
set -l skin tool
|
||||||
|
if begin ; type valgrind >/dev/null ; and valgrind --version ^/dev/null | sgrep -- '-2\.[012]\.' >/dev/null ^/dev/null ; end
|
||||||
# In older versions of Valgrind, the skin selection option was
|
# In older versions of Valgrind, the skin selection option was
|
||||||
# '--skin'
|
# '--skin'
|
||||||
set skin skin
|
|
||||||
else
|
|
||||||
# But someone decided that it would be fun to change this to
|
# But someone decided that it would be fun to change this to
|
||||||
# '--tool' for no good reason
|
# '--tool' for no good reason
|
||||||
set skin tool
|
set skin skin
|
||||||
end
|
end
|
||||||
|
|
||||||
complete -xc valgrind -l $skin --description "Skin" -a "
|
complete -xc valgrind -l $skin --description "Skin" -a "
|
||||||
|
|
Loading…
Reference in a new issue