Add configurable session host shortnames

This commit is contained in:
Kenneth Benzie 2024-08-23 21:40:19 +01:00
parent 6c86d1c0cc
commit 1e53581d17

View File

@ -8,6 +8,12 @@ session() {
echo "$fg[red]error:$reset_color invalid argument: $3" echo "$fg[red]error:$reset_color invalid argument: $3"
return 1 return 1
fi fi
declare -A hosts
if [ -f ~/.config/session ]; then
source ~/.config/session
fi
local url=$hosts[$host]
host=${url:-$host}
if [[ "$TMUX" == "" ]]; then if [[ "$TMUX" == "" ]]; then
local cmd="tmux new-session -As $name" local cmd="tmux new-session -As $name"
if [[ "$host" != "" ]]; then if [[ "$host" != "" ]]; then