Swap out ide alias for a function

This commit is contained in:
2023-03-24 01:39:47 -05:00
parent 77fcf956fe
commit a1dd3a635a
3 changed files with 10 additions and 21 deletions

21
zshrc
View File

@ -106,18 +106,17 @@ if (( $+commands[zellij] )); then
ZELLIJ_AUTO_ATTACH=true
eval "$(zellij setup --generate-auto-start zsh)"
if (( ${+ZELLIJ} )); then
zellij_chpwd_hook() {
local cwd=${PWD##*/}
local cwd=${cwd:-/}
ide() {
local layout="${HOME}/.config/zellij/layouts/ide.kdl"
local name=${PWD##*/}
local name=${name:-/}
zellij action rename-tab $cwd
}
chpwd_functions+=( zellij_chpwd_hook )
zellij_chpwd_hook
fi
if (( ${+ZELLIJ} )); then
zellij action new-tab --layout "${layout}" --cwd "${PWD}" --name "${name}"
else
zellij --layout "${layout}" $@
fi
}
fi
# git