鱼壳-在屏幕的窗口标题中显示当前命令 [英] fish shell - Showing the current command in the window title of screen

查看:80
本文介绍了鱼壳-在屏幕的窗口标题中显示当前命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I want the current command to be shown in the title of screen (or tmux).

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

I tried following settings but it doesn't work.

我如何使它工作?

.screenrc

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

.config/fish/config.fish

set -x PS1 '\033k\033\\[\u@\h \W]\$ '

推荐答案

感谢您的回答. 终于,这使它起作用了!

Thanks for your answers. Finally, this made it work!

.screenrc

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

.config/fish/config.fish

function fish_prompt
    echo -ne '\033k'
    echo -ne $argv
    echo -ne '\033\\'
    echo -ne '$ '
end

这篇关于鱼壳-在屏幕的窗口标题中显示当前命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆