Shell 变量未在 Tmux 配置中 seen/used

Shell variable is not being seen/used in Tmux configuration

我正在尝试使用 Tmux 中的 shell 变量来为尊贵的 powerline 配置一些设置。我的 .tmux.config 中的兴趣线是:

run-shell "powerline-daemon -q"
source-file $POWERLINE_ROOT/powerline/bindings/tmux/powerline.conf

我收到以下错误:

/Users/myname/.tmux.conf:47: /powerline/bindings/tmux/powerline.conf: No such file or directory

似乎环境变量$POWERLINE_ROOT的值没有被Tmux看到。 (我可以确认 $POWERLINE_ROOT 确实有一个非空值。)

如果需要你可以看到我完整的Tmux configuration

这是我所知道的:

我的 .bashrc 中有以下内容:

export __tmux_bg_inactive='234'
export __tmux_bg_active='233'
export __tmux_fg_inactive='245'
export __tmux_fg_active='248'

我的 .tmux.conf 中有以下内容:

set -g window-style "fg=colour${__tmux_fg_inactive},bg=colour${__tmux_bg_inactive}" 
set -g window-active-style "fg=colour${__tmux_fg_active},bg=colour${__tmux_bg_active}" 
set -g pane-active-border-style "fg=colour$__green, bg=colour$__tmux_bg_active"
set -g pane-border-style "fg=colour$__tmux_fg_inactive, bg=colour$__tmux_bg_inactive"

这对我有用。也许是我 export 设置了变量的原因,或者也许是因为它在我的 .bashrc 中所以它在任何地方都被设置 tmux 可能需要它?

如果这不起作用,请告诉我。