zellij: fix stale ssh env, auto tab names, hx scrollback
This commit is contained in:
@@ -29,3 +29,15 @@ source $ZSH/oh-my-zsh.sh
|
||||
|
||||
[ -f ~/.shellrc.alias ] && source ~/.shellrc.alias
|
||||
[ -f ~/.shellrc.local ] && source ~/.shellrc.local
|
||||
|
||||
function set_zellij_tab_to_working_dir() {
|
||||
local current_dir=$PWD
|
||||
if [[ $current_dir == $HOME ]]; then
|
||||
current_dir="~"
|
||||
else
|
||||
current_dir=${current_dir##*/}
|
||||
fi
|
||||
command nohup zellij action rename-tab $current_dir >/dev/null 2>&1
|
||||
}
|
||||
|
||||
[[ -n $ZELLIJ ]] && add-zsh-hook precmd set_zellij_tab_to_working_dir
|
||||
|
||||
Reference in New Issue
Block a user