Ω
This commit is contained in:
@ -63,6 +63,8 @@ then
|
||||
else
|
||||
alias dc="sudo docker-compose"
|
||||
fi
|
||||
|
||||
|
||||
alias d="sudo docker"
|
||||
|
||||
alias t="tmux"
|
||||
|
@ -12,3 +12,4 @@ source $(dirname "$0")/functions/run.zsh;
|
||||
source $(dirname "$0")/functions/conf.zsh;
|
||||
source $(dirname "$0")/functions/note.zsh;
|
||||
source $(dirname "$0")/functions/mv-safe.zsh;
|
||||
source $(dirname "$0")/functions/ssh_selector.zsh;
|
||||
|
12
configs/zsh/functions/ssh_selector.zsh
Executable file
12
configs/zsh/functions/ssh_selector.zsh
Executable file
@ -0,0 +1,12 @@
|
||||
function s(){
|
||||
# Get a list of all available SSH clients from the ~/.ssh/config file and pass them to fzf
|
||||
selected_client=$(grep -E "^Host\s+" ~/.ssh/config | awk '{print $2}' | fzf)
|
||||
|
||||
# Check if a selection was made
|
||||
if [ -n "$selected_client" ]; then
|
||||
# Connect to the selected SSH client
|
||||
ssh "$selected_client"
|
||||
else
|
||||
echo "No SSH client selected. Exiting."
|
||||
fi
|
||||
}
|
Reference in New Issue
Block a user