
當我以特定方式在 shell 之間切換時,我遇到了 zsh 的奇怪問題:
選項 1(效果很好):
我啟動一個zsh
外殼。我切換到tcsh
with /bin/tcsh
,然後切換回zsh
with/bin/zsh
如果我然後運行:
> ls
我得到:
./ ../ file1 file1 file3
選項 2(有問題):
我啟動一個zsh
外殼。我切換到tcsh
:
exec env -i HOME=$HOME TERM=$TERM DISPLAY=$DISPLAY /bin/tcsh
。
然後我切換回zsh
with /bin/zsh
。如果我隨後輸入任何命令,zsh
shell 會回顯該命令,然後回顯結果。使用與之前相同的範例:
> ls
2;ls --color=yes -aF1;./ ../ file1 file2 file3
換句話說,zsh 顯示2;COMMAND 1;
然後是輸出,這當然與我得到的非常不同選項1。
更奇怪的是,這只發生在Emacs 中的ansi-term
或multi-term
終端內,而不是在gnome-terminal
.
我還能做什麼來診斷問題?對於可能導致這種情況的原因有什麼想法嗎?
更新:
我的.cshrc
提示是
set prompt = "> "