From 1e53581d17836b1b5d23c8d5a9e368171ac355b2 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Fri, 23 Aug 2024 21:40:19 +0100 Subject: [PATCH] Add configurable session host shortnames --- session/session.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/session/session.plugin.zsh b/session/session.plugin.zsh index d79840b..9c099ea 100644 --- a/session/session.plugin.zsh +++ b/session/session.plugin.zsh @@ -8,6 +8,12 @@ session() { echo "$fg[red]error:$reset_color invalid argument: $3" return 1 fi + declare -A hosts + if [ -f ~/.config/session ]; then + source ~/.config/session + fi + local url=$hosts[$host] + host=${url:-$host} if [[ "$TMUX" == "" ]]; then local cmd="tmux new-session -As $name" if [[ "$host" != "" ]]; then