Use command -sq instead of redirection

This option has been available for a while now and it's a bit shorter.
This commit is contained in:
Fabian Homborg
2017-02-13 17:30:38 +01:00
parent 40de253b3a
commit 0a8c922d92
16 changed files with 19 additions and 19 deletions

View File

@@ -23,7 +23,7 @@ set -g fish_prompt_git_status_order added modified renamed copied deleted untrac
function __terlar_git_prompt --description 'Write out the git prompt'
# If git isn't installed, there's nothing we can do
# Return 1 so the calling prompt can deal with it
if not command -s git >/dev/null
if not command -sq git
return 1
end
set -l branch (git rev-parse --abbrev-ref HEAD ^/dev/null)