"cd .."的Zsh制表符完成. [英] Zsh tab-completion for "cd .."

查看:109
本文介绍了"cd .."的Zsh制表符完成.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我该如何配置Zsh制表符补全,以便在键入cd ..<TAB>时将其扩展为cd ../,并在再次按<TAB>后建议在父目录中完成文件夹?

How can I configure the Zsh tab-completion such that when I type cd ..<TAB> it expands to cd ../ and after pressing <TAB> again proposes the folders in the parent directory for completion?

例如它应该表现出与键入cd Documents<TAB>相同的行为,例如,扩展为cd Documents/,然后再次按下<TAB>时,会提出Documents中的文件夹以供完成.

E.g. it should show the same behavior as when typing for example cd Documents<TAB> which expands to cd Documents/ and after pressing <TAB> again proposes the folders in Documents for completion.

作为配置的起点,我使用MacPorts中的空白.zshrc和Zsh 4.3.9.

As a starting point for configuration I use an empty .zshrc and Zsh 4.3.9 from MacPorts.

推荐答案

与debian不稳定,Ubuntu困扰有关的相同问题,均在zsh 4.3.9中提供.我知道有多个人有不同的配置.

Same problem with debian unstable, Ubuntu jaunty, both ship zsh 4.3.9. I know of multiple people with different configurations.

阅读 http://bugs.debian.org/cgi- bin/bugreport.cgi?bug = 514152 我添加了

zstyle ':completion:*' special-dirs true

恢复到我的配置,现在一切正常.

to my config and now everything works fine again.

这篇关于"cd .."的Zsh制表符完成.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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