Compare commits

...

3 Commits

Author SHA1 Message Date
Xin Li 9689246173
Merge c1d06b2365 into 6e9cda3d30 2025-01-22 12:17:34 +01:00
dependabot[bot] 6e9cda3d30
chore(deps): bump semver in /.github/workflows/dependencies (#12924)
Bumps [semver](https://github.com/python-semver/python-semver) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/python-semver/python-semver/releases)
- [Changelog](https://github.com/python-semver/python-semver/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/python-semver/python-semver/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-19 23:30:40 +01:00
Xin Li c1d06b2365 Make tmux plugin refresh tmux global environments automatically. 2025-01-01 22:54:59 -08:00
2 changed files with 18 additions and 1 deletions

View File

@ -3,5 +3,5 @@ charset-normalizer==3.4.1
idna==3.10
PyYAML==6.0.2
requests==2.32.3
semver==3.0.2
semver==3.0.3
urllib3==2.3.0

View File

@ -15,6 +15,8 @@ fi
: ${ZSH_TMUX_AUTOQUIT:=$ZSH_TMUX_AUTOSTART}
# Automatically name the new session based on the basename of PWD
: ${ZSH_TMUX_AUTONAME_SESSION:=false}
# Automatically pick up tmux environments
: ${ZSH_TMUX_AUTOREFRESH:=true}
# Set term to screen or screen-256color based on current terminal support
: ${ZSH_TMUX_DETACHED:=false}
# Set detached mode
@ -158,6 +160,15 @@ function _zsh_tmux_plugin_run() {
fi
}
# Refresh tmux environment variables.
function _zsh_tmux_plugin_preexec()
{
local -a tmux_cmd
tmux_cmd=(command tmux)
eval $($tmux_cmd show-environment -s)
}
# Use the completions for tmux for our function
compdef _tmux _zsh_tmux_plugin_run
# Alias tmux to our wrapper function.
@ -184,3 +195,9 @@ if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && -z "$INSIDE_EMACS" && -z
_zsh_tmux_plugin_run
fi
fi
# Automatically refresh tmux environments if tmux is running.
if [[ -n "$TMUX" && "$ZSH_TMUX_AUTOREFRESH" == "true" ]] && tmux ls >/dev/null 2>/dev/null; then
autoload -U add-zsh-hook
add-zsh-hook preexec _zsh_tmux_plugin_preexec
fi