docker容器内部运行的tmux prints ^[[a, ^[b, ^[c,and ^[[d for arrow键

发布于 2025-01-28 22:34:24 字数 625 浏览 2 评论 0原文

我有一个在Ubuntu机器上运行的Docker容器;但是,当我在该码头容器内运行Tmux时,有几个症状:

  1. 提示字符串更改为$(如 this 问题)
  2. 上下箭头键打印^[[a and ^[[B而不是浏览命令历史
  3. 记录TAB键不会按预期进行自动完成,而是打印一个实际选项卡。

颜色表现良好。

我的.tmux.conf包含以下内容:set -g default-terminal“ screen-256color”

我的环境变量(在docker容器中)应正确设置。 lang = en_us.utf-8 $ term ='Screen -256Color'

我尝试了tmux -u new,如上所述的问题。

我正在通过当地机器的终端进入这台Ubuntu机器。

I have a docker container running on an ubuntu machine; however, when I run tmux inside that docker container, there are several symptoms:

  1. the prompt string changes to $ (as in this question)
  2. the up and down arrow keys print ^[[A and ^[[B instead of scrolling through command history
  3. the tab key does not do auto-completion as expected, but rather prints an actual tab.

Colors are displaying fine.

My .tmux.conf contains the following: set -g default-terminal "screen-256color"

My environment variables (within the docker container) should be set correctly.
LANG=en_US.UTF-8
$TERM='screen-256color'

I have tried tmux -u new, as in the question linked above.

I am ssh-ing into this ubuntu machine via my local machine's terminal.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文