change depricated which to command -v
This commit is contained in:
parent
641e247c34
commit
89d517fe40
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
# colors
|
# colors
|
||||||
if [ -x "$(which dircolors)" ]; then
|
if [ -x "$(command -v dircolors)" ]; then
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
|
||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
|
|||||||
@ -152,7 +152,7 @@ docker_ips() {
|
|||||||
|
|
||||||
|
|
||||||
py() {
|
py() {
|
||||||
if [ -z "$@" -a -n "$(which ipython)" ]; then
|
if [ -z "$@" -a -x "$(command -v ipython)" ]; then
|
||||||
ipython -i -c "q = exit"
|
ipython -i -c "q = exit"
|
||||||
else
|
else
|
||||||
python3 $@
|
python3 $@
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
parse_git_branch() {
|
parse_git_branch() {
|
||||||
|
|
||||||
if ! [ -x "$(which git)" ]; then
|
if ! [ -x "$(command -v git)" ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -67,7 +67,7 @@ map("c", '%%', [[getcmdtype() == ':' ? expand('%:h').'/' : '%%']], {expr = true}
|
|||||||
|
|
||||||
|
|
||||||
-- Save from root
|
-- 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']], {})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user