diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-01-30 02:22:22 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-01-30 02:22:22 -0800 |
commit | ea8c6bc15ebd973f41b33a103b1e63cc9a772058 (patch) | |
tree | 6e46dd360f7c7dab782948739e39b174f3f5d429 /share | |
parent | 4683ce2771f763c7a18b62013e62cf70f405defa (diff) |
Try to make Valgrind completion not complain if valgrind is not installed
Diffstat (limited to 'share')
-rw-r--r-- | share/completions/valgrind.fish | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/share/completions/valgrind.fish b/share/completions/valgrind.fish index 6ef855bc..a1bd1472 100644 --- a/share/completions/valgrind.fish +++ b/share/completions/valgrind.fish @@ -1,12 +1,12 @@ -set -l skin -if valgrind --version | sgrep -- '-2\.[012]\.' >/dev/null ^/dev/null +# Don't go invoking valgrind unless it is installed + +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 # '--skin' - set skin skin -else # But someone decided that it would be fun to change this to # '--tool' for no good reason - set skin tool + set skin skin end complete -xc valgrind -l $skin --description "Skin" -a " |