change depricated which to command -v

This commit is contained in:
TheK4n 2023-01-24 13:02:31 +03:00
parent 641e247c34
commit 89d517fe40
4 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# colors
if [ -x "$(which dircolors)" ]; then
if [ -x "$(command -v dircolors)" ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias grep='grep --color=auto'

View File

@ -152,7 +152,7 @@ docker_ips() {
py() {
if [ -z "$@" -a -n "$(which ipython)" ]; then
if [ -z "$@" -a -x "$(command -v ipython)" ]; then
ipython -i -c "q = exit"
else
python3 $@

View File

@ -1,7 +1,7 @@
parse_git_branch() {
if ! [ -x "$(which git)" ]; then
if ! [ -x "$(command -v git)" ]; then
return
fi

View File

@ -67,7 +67,7 @@ map("c", '%%', [[getcmdtype() == ':' ? expand('%:h').'/' : '%%']], {expr = true}
-- Save from root
vim.api.nvim_create_user_command('Sw', [[execute 'silent! write !SUDO_ASKPASS=$(which vim_askpass_helper) sudo -A tee % >/dev/null']], {})
vim.api.nvim_create_user_command('Sw', [[execute 'silent! write !SUDO_ASKPASS=$(command -v vim_askpass_helper) sudo -A tee % >/dev/null']], {})