本文介绍了使用 ZSH 完成制表符时的剩余字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Arch linux 中使用 oh-my-zsh 并加载了 robbyrussell 主题.当我尝试完成选项卡时,我最终将剩余字符附加到提示中.如果我删除自动完成的字符,剩余的字符不会删除.

I'm using oh-my-zsh in Arch linux with the robbyrussell theme loaded. When I try to tab complete I end up with remnant characters appended to the prompt. If I delete the auto-completed characters, the remnant characters do not delete.

例如,如果我输入:

~ /etc

然后tab,它变成

~ /e/etc/

带有以下选项列表.即使我删除了 /etc//e 仍然存在,我仍然坚持:

with a list of options below. Even if I delete /etc/, the /e remains and I'm stuck with:

~ /e

我无法删除 /e.我必须执行一个命令来摆脱残留的字符.

I can't delete the /e. I have to execute a command to get rid of the remnant character.

知道这里发生了什么吗?

Any idea what is going on here?

推荐答案

原来是语言环境问题.直到我在某处删除了一些配置文件并重新运行它之后,运行 locale-gen 才起作用.

Turns out it was a locale issue. Running locale-gen didn't work until I deleted some config file somewhere and reran it.

不过,您的建议对提示很有用.谢谢.

Your advice is good for the prompt though. Thank you.

这篇关于使用 ZSH 完成制表符时的剩余字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 11:31