mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
Merge 817d1f4b01 into 0eecd2821e
This commit is contained in:
commit
40a4c8b7c3
1 changed files with 13 additions and 3 deletions
|
|
@ -100,8 +100,12 @@ fi
|
|||
0="${${(M)0:#/*}:-$PWD/$0}"
|
||||
|
||||
# Set the correct local config file to use.
|
||||
if [[ "$ZSH_TMUX_ITERM2" == "false" && -e "$ZSH_TMUX_CONFIG" ]]; then
|
||||
# Always export ZSH_TMUX_CONFIG so tmux can source it when processing
|
||||
# the fixed config (tmux.extra.conf) via $ZSH_TMUX_CONFIG.
|
||||
if [[ -e "$ZSH_TMUX_CONFIG" ]]; then
|
||||
export ZSH_TMUX_CONFIG
|
||||
fi
|
||||
if [[ "$ZSH_TMUX_ITERM2" == "false" && -e "$ZSH_TMUX_CONFIG" ]]; then
|
||||
export _ZSH_TMUX_FIXED_CONFIG="${0:h:a}/tmux.extra.conf"
|
||||
else
|
||||
export _ZSH_TMUX_FIXED_CONFIG="${0:h:a}/tmux.only.conf"
|
||||
|
|
@ -143,10 +147,16 @@ function _zsh_tmux_plugin_run() {
|
|||
|
||||
# If failed, just run tmux, fixing the TERM variable if requested.
|
||||
if [[ $? -ne 0 ]]; then
|
||||
# Always load the user's config first when it exists, regardless of
|
||||
# whether TERM fix is enabled. This ensures custom configs (e.g. from
|
||||
# oh-my-tmux) are not overridden by the plugin's fixed config.
|
||||
if [[ -e "$ZSH_TMUX_CONFIG" ]]; then
|
||||
tmux_cmd+=(-f "$ZSH_TMUX_CONFIG")
|
||||
fi
|
||||
# Apply the TERM fix on top, which will also source-file the user's config
|
||||
# (via tmux.extra.conf) to preserve custom settings.
|
||||
if [[ "$ZSH_TMUX_FIXTERM" == "true" ]]; then
|
||||
tmux_cmd+=(-f "$_ZSH_TMUX_FIXED_CONFIG")
|
||||
elif [[ -e "$ZSH_TMUX_CONFIG" ]]; then
|
||||
tmux_cmd+=(-f "$ZSH_TMUX_CONFIG")
|
||||
fi
|
||||
|
||||
if [[ -n "$session_name" ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue