如果默认 shell 是 fish,tmux 将不会启动
tmux won't start if default shell is fish
我通过 apt
在 Ubuntu 19.04 (Disco Dingo) 上安装了 tmux
和 fish
。
tmux
开箱即用,但它使用 bash
,我希望它使用 fish
作为默认值 shell。
因此我在 ~/.tmux.conf
中添加了以下行:
~$ cat .tmux.conf
set-option -g default-shell fish
但是 tmux
将不再启动,而是打印出奇怪的字符并死掉:
~$ tmux
[exited]
~$ [?65;1;9c
(注意:奇怪的字符不是我打的,它们在我光标之前就结束了)
请注意,如果我删除 ~/.tmux.conf
(然后 tmux
开始使用 bash 并且效果很好),
我可以通过从 bash
.
调用 fish
来使用 fish
知道发生了什么以及我该如何解决这个问题吗?
Tmux 需要完整路径:
set-option -g default-shell /usr/bin/fish
(或您的鱼所在的任何路径。参见 command -s fish
)
为了了解您的 fish 二进制文件在哪里 运行 此代码:
user@user$ which fish
它应该是这样的:
/usr/bin/fish
然后将这些行加上路径放在文件末尾 .tmux.conf
:
设置-g default-command /path/to/your/fish/
设置-g default-shell /path/to/your/fish/
我通过 apt
在 Ubuntu 19.04 (Disco Dingo) 上安装了 tmux
和 fish
。
tmux
开箱即用,但它使用 bash
,我希望它使用 fish
作为默认值 shell。
因此我在 ~/.tmux.conf
中添加了以下行:
~$ cat .tmux.conf
set-option -g default-shell fish
但是 tmux
将不再启动,而是打印出奇怪的字符并死掉:
~$ tmux
[exited]
~$ [?65;1;9c
(注意:奇怪的字符不是我打的,它们在我光标之前就结束了)
请注意,如果我删除 ~/.tmux.conf
(然后 tmux
开始使用 bash 并且效果很好),
我可以通过从 bash
.
fish
来使用 fish
知道发生了什么以及我该如何解决这个问题吗?
Tmux 需要完整路径:
set-option -g default-shell /usr/bin/fish
(或您的鱼所在的任何路径。参见 command -s fish
)
为了了解您的 fish 二进制文件在哪里 运行 此代码:
user@user$ which fish
它应该是这样的:
/usr/bin/fish
然后将这些行加上路径放在文件末尾 .tmux.conf
:
设置-g default-command /path/to/your/fish/
设置-g default-shell /path/to/your/fish/