gpt4 book ai didi

gnu-screen - fish shell -在 screen 的窗口标题中显示当前命令

转载 作者:行者123 更新时间:2023-12-04 14:44:41 25 4
gpt4 key购买 nike

我希望当前命令显示在屏幕标题(或tmux)中。

我尝试了以下设置,但不起作用。

我该如何运作?

.screenrc

shelltitle "$ |fish"
shell /usr/local/bin/fish

.config/fish/config.fish
set -x PS1 '\033k\033\\[\u@\h \W]\$ '

最佳答案

对于Fish版本2.1.0,您只需要编辑〜/.config/fish/functions/fish_title.fish

function fish_title
hostname
end

对于1.23.1版本,这似乎不起作用。如果目录不存在,请首先创建它们:

mkdir -p〜/.config/fish/functions/

关于gnu-screen - fish shell -在 screen 的窗口标题中显示当前命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24885174/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com