use command -sq instead of which

This commit is contained in:
Hedy Li 2021-01-29 13:20:38 +00:00
parent 5c86d052d3
commit b81e2cae63
4 changed files with 11 additions and 7 deletions

View File

@ -1,3 +1,7 @@
bass 'export GEM_HOME=$HOME/gems'
bass 'export BROWSER=w3m'
if command -sq links
bass 'export BROWSER=links'
else
bass 'export BROWSER=w3m'
end
umask 0002

View File

@ -1,7 +1,7 @@
function cat --wraps=ccat --description 'alias cat=ccat'
if which ccat > /dev/null
ccat $argv;
if command -sq ccat
ccat $argv;
else
/usr/bin/cat $argv;
end
end
end

View File

@ -1,5 +1,5 @@
function ll
if which exa > /dev/null
if command -sq exa
exa -lahg --git -t modified $argv
else
ls -Al $argv

View File

@ -1,6 +1,6 @@
function rm --wraps=trash --description 'alias rm=trash'
if which trash > /dev/null
trash $argv;
if command -sq trash
trash $argv;
else
/usr/bin/rm $argv;
end