feat(zsh): idiomatically organise .zprofile .zshenv and .zshrc

This commit is contained in:
2026-03-09 12:08:23 +01:00
parent 7829980f8f
commit d92857428e
5 changed files with 26 additions and 21 deletions

View File

@@ -1,10 +1,11 @@
function tmux_attach {
local tmux_running
tmux_running=$(pgrep tmux)
if ! [[ -z ${TMUX} ]]; then
if [[ -n ${TMUX} ]]; then
echo "already attached; refreshing env"
source <(tmux show-environment | sed -n 's/^\(.*\)=\(.*\)$/export \1="\2"/p')
return 1
return 0
fi
if [[ -z $tmux_running ]]; then