1
0
Fork 0

zsh: updated functions

This commit is contained in:
Von Random 2022-09-24 16:15:54 +03:00
parent 1887185b4c
commit 469f9049be

View file

@ -13,6 +13,14 @@ termcompat() {
TERM=$term command $@ TERM=$term command $@
} }
addpath() {
typeset newpath=$1
if [[ ! $PATH =~ $newpath ]]; then
PATH+=:$newpath
export PATH
fi
}
fsf() { fsf() {
typeset host prompt="SSH Remote > " typeset host prompt="SSH Remote > "
host=$(cut -d\ -f1 $HOME/.ssh/known_hosts | sort -u | fzf --prompt=$prompt) || return 1 host=$(cut -d\ -f1 $HOME/.ssh/known_hosts | sort -u | fzf --prompt=$prompt) || return 1