Better use of which-command and a clip func

This commit is contained in:
Gal Szkolnik 2022-06-29 01:24:41 -04:00
parent 41ca116a70
commit 70aa423d53
2 changed files with 6 additions and 2 deletions

View File

@ -10,3 +10,7 @@ alias lessr="less --raw-control-chars "
alias sz-edshrc="ed ~/.sz.shrc.d ; exec $SHELL" alias sz-edshrc="ed ~/.sz.shrc.d ; exec $SHELL"
[[ -z "$(env inkscape 2> /dev/null)" && -n "$(flatpak info org.inkscape.Inkscape 2> /dev/null)" ]] && alias inkscape="flatpak run org.inkscape.Inkscape " [[ -z "$(env inkscape 2> /dev/null)" && -n "$(flatpak info org.inkscape.Inkscape 2> /dev/null)" ]] && alias inkscape="flatpak run org.inkscape.Inkscape "
function clip() {
xclip -i -sel clipboard
}

View File

@ -1,4 +1,4 @@
TERRAFORM_BIN=$(type -fP terraform | head -1) TERRAFORM_BIN=$(which-command terraform | head -1)
if [[ -n $TERRAFORM_BIN ]]; then if [[ -x $TERRAFORM_BIN ]]; then
complete -C $TERRAFORM_BIN terraform complete -C $TERRAFORM_BIN terraform
fi fi