diff --git a/sh/.config/sh/alias b/sh/.config/sh/alias index 5746afb..9b1c9a8 100644 --- a/sh/.config/sh/alias +++ b/sh/.config/sh/alias @@ -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 diff --git a/sh/.config/sh/alias.d/enable-fasd-hook.sh b/sh/.config/sh/alias.d/enable-fasd-hook.sh index 7b12527..ca239f0 100644 --- a/sh/.config/sh/alias.d/enable-fasd-hook.sh +++ b/sh/.config/sh/alias.d/enable-fasd-hook.sh @@ -1,7 +1,7 @@ #!/bin/sh # more usage instructions at https://github.com/clvv/fasd # eval "$(fasd --init posix-hook posix_alias bash-hook zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install)" -type fasd >/dev/null 2>&1 && eval "$(fasd --init auto)" +exist fasd && eval "$(fasd --init auto)" # any alias a='fasd -a' diff --git a/sh/.config/sh/alias.d/yay.sh b/sh/.config/sh/alias.d/yay.sh index 3e18c2e..62f99a6 100644 --- a/sh/.config/sh/alias.d/yay.sh +++ b/sh/.config/sh/alias.d/yay.sh @@ -6,28 +6,28 @@ # Also makes yay call paru since that is the new hotness # (or at least I want to try it) -type paru >/dev/null 2>&1 && { +exist paru && { # recreate the normal look of yay alias yay="paru --bottomup" } syu() { - type topgrade >/dev/null 2>&1 && { + exist topgrade && { topgrade return } - type paru >/dev/null 2>&1 && { + exist paru && { paru return } - type yay >/dev/null 2>&1 && { + exist yay && { yay return } - type pacman >/dev/null 2>&1 && { + exist pacman && { echo "Did not find paru, or yay installed. Updates will not be applied to aur packages." sudo pacman -Syu return