diff --git a/bash/.bash_functions b/bash/.bash_functions index 8c19812..975be4a 100644 --- a/bash/.bash_functions +++ b/bash/.bash_functions @@ -11,8 +11,12 @@ ssh() { # Use fzf to find all your configured ssh connection ssh-host() { - ssh $(cat "$HOME/.ssh/config" "$HOME/.ssh/conf.d/individual_user" \ - | awk '$1 == "Host" && $2 != "*" {print $2}' | fzf --reverse) + if [ "$(which fzf 2>/dev/null)" ]; then + ssh $(cat "$HOME/.ssh/config" "$HOME/.ssh/conf.d/individual_user" \ + | awk '$1 == "Host" && $2 != "*" {print $2}' | fzf --reverse) + else + echo "fzf not installed!" + fi } # Creates a new directory and immediately changes into it