如果声明了环境变量,我想更改前缀。我在.tmux.conf
上尝试了以下配置这总是改变(声明或不声明$ SSH_CLIENT):
if-shell "test -n $SSH_CLIENT" "set -g prefix C-a"
还有:
if-shell "[[ -n $SSH_CLIENT ]]" "set -g prefix C-a"
但是这段代码永远不会改变:
if-shell "[ -n $SSH_CLIENT ]" "set -g prefix C-a"
答案 0 :(得分:3)
最后,在tmux-users邮件列表的帮助下,它工作正常,但1.8仍存在问题
# if if-shell goes in the beggining it will break the following command. this is going to be fixed after 1.8
# make c-a work as c-b
if-shell 'test -z "$SSH_CLIENT"' 'set -g prefix C-a'
https://github.com/brauliobo/gitconfig/blob/master/configs/.tmux.conf