sh: Use exist program
Fix sh module packages to make more extensive use of the exist program that also ships with the sh module. Simplifies intent of the code and makes it much easier to read.
This commit is contained in:
parent
ea95ca7dfa
commit
a27d86942b
3 changed files with 8 additions and 8 deletions
|
|
@ -61,6 +61,8 @@ if exist fzf; then
|
|||
fzf_pkg_tool=yay
|
||||
elif exist paru; then
|
||||
fzf_pkg_tool=paru
|
||||
elif exist pacman; then
|
||||
fzf_pkg_tool=pacman
|
||||
fi
|
||||
# shellcheck disable=2139 # we *want* this to be done at shell startup instead of dynamically
|
||||
if [ -n "$fzf_pkg_tool" ]; then
|
||||
|
|
@ -89,6 +91,4 @@ fi
|
|||
if exist vifm; then
|
||||
alias vm=vifm
|
||||
alias vmm='vifm ${PWD}'
|
||||
# enable picture preview script
|
||||
exist vifmrun && alias vifm=vifmrun
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue