From 469f9049bef817ad26a7287ce87cc712c781b859 Mon Sep 17 00:00:00 2001 From: Von Random Date: Sat, 24 Sep 2022 16:15:54 +0300 Subject: [PATCH] zsh: updated functions --- zsh/functions.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index 76b1b68..69e01b6 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -13,6 +13,14 @@ termcompat() { TERM=$term command $@ } +addpath() { + typeset newpath=$1 + if [[ ! $PATH =~ $newpath ]]; then + PATH+=:$newpath + export PATH + fi +} + fsf() { typeset host prompt="SSH Remote > " host=$(cut -d\ -f1 $HOME/.ssh/known_hosts | sort -u | fzf --prompt=$prompt) || return 1