ZSH 目录扩展('..' 为 '../')
我最近开始学习和使用ZSH。
我面临的问题是 ZSH 不会将命令(如“cd”、“cp”等)中的“..”自动扩展为“../”。巴什就是这样做的。
如果我使用美国布局的键盘,这不会是一个大问题……但在斯堪的纳维亚半岛,“/”位于 SHIFT+7 后面,因此敲击速度要快得多。
我将如何继续并实现这种自动扩展?我正在使用“Oh my ZSH”包。输入“cd ..”后输入 CTRL+xh 将给出以下内容:
21:16:50 amjr@imac development ruby-1.9.2-p290 cd ..
tags in context :completion::complete:cd::
local-directories named-directories (_alternative _cd (eval))
users named-directories directory-stack (_tilde _alternative _cd (eval))
users (_users _tilde _alternative _cd (eval))
任何帮助将不胜感激!
I've recently started to learn and use ZSH.
The problem I'm facing is that ZSH won't auto-expand '..' in commands (like 'cd', 'cp' and so on) into '../'. Bash does this.
This wouldn't be such an big issue if I were using keyboard with US-layout... but in scandinavia '/' is behind SHIFT+7 so hitting is much faster.
How would I go on and implement such automatic expansion? I'm usin 'Oh my ZSH' package. Typing CTRL+xh after typing 'cd ..' gives the following:
21:16:50 amjr@imac development ruby-1.9.2-p290 cd ..
tags in context :completion::complete:cd::
local-directories named-directories (_alternative _cd (eval))
users named-directories directory-stack (_tilde _alternative _cd (eval))
users (_users _tilde _alternative _cd (eval))
Any help would be appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想要实现的是,当我输入“..”后点击它时,它会将其扩展为“../”。
我设法通过添加以下内容来实现此功能:
到我的 .zshrc 中
What I was trying to achieve is that when I hit after typing '..' it would expand it into '../'.
I managed to get this working by adding:
into my .zshrc