Csh 是否有自动完成设置可以更好地处理大小写?
我在 .cshrc 中打开了自动完成功能:
set autolist
set correct=cmd
set complete=enhance
效果非常好,除非涉及到案例。
我有一个包含这些文件的目录:
ToolConfig.pm* ToolConfig.pm_bak* Toolconfig_init.pm*
ToolConfig.pm.orig* ToolConfig.pm~*
在提示符下,我键入“tool -tab-”,它给了我: 工具配置
好。 生成 Toolconfig.pm
然后我输入“.pm”,此时 ,再次点击 -tab- 并让它通过大写“c”来完成工作肯定会很好。我有一个完整的文件名,当然还有其他可能性,但对于当前的刺痛,我必须将光标移回自己来做。
有点否定了完成的一些效用。
当然,我并没有陷入这种沮丧之中。必须有一些特殊的酱汁来解决这个问题。
I have auto complete turned on in my .cshrc:
set autolist
set correct=cmd
set complete=enhance
works pretty nicely, except when it comes to case.
I have a directory that contains these files:
ToolConfig.pm* ToolConfig.pm_bak* Toolconfig_init.pm*
ToolConfig.pm.orig* ToolConfig.pm~*
At the prompt, I type, "tool -tab-" and it gives me:
Toolconfig
ok. I then type ".pm", yielding Toolconfig.pm
at this point, it sure would be nice to hit -tab- again and have it finish the job by making upcasing the 'c'. I have a complete filename, sure there are additional possibilities, but for the current sting, I have to move the cursor back to do it myself.
Kinda negates some of the utility of completion.
Surely, I am not along in this frustration. There must be some special sauce to fix this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果删除“setcomplete=enhance”,您将获得区分大小写的制表符补全,因此键入“T[tab]”会扩展为“Tool”,此时您可以选择大写或小写的“c” 。
为了看到更改,您必须取消设置“完成”或注销并登录
If you remove the 'set complete=enhance" you'll get a case-sensitive Tab completion, so that typing "T[tab]" expands to "Tool" at which point you can choose an upper- or lower-case 'c'.
In order to see the change, you'll have to unset 'complete' or logout and login.
您是否尝试过使用大写“E”而不是“enhance”设置complete=Enhance。
从手册页中,我读到:
如果完整的 shell 变量设置为“Enhance”,则完成会忽略大小写并
仅当用户使用连字符和下划线单词分隔符之间的差异
键入小写字符或连字符。输入大写字符或
下划线不会匹配相应的小写字符或连字符单词
分隔符。
这比我的用例中的“增强”提供了更好的完成度。
尝试一下,如果有更好的,请告诉我们......
Have you tried set complete=Enhance with upper case "E" instead of "enhance".
From the man page, I read:
If the complete shell variable is set to `Enhance', completion ignores case and
differences between a hyphen and an underscore word separator only when the user
types a lowercase character or a hyphen. Entering an uppercase character or an
underscore will not match the corresponding lowercase character or hyphen word
separator.
This gives a little better completion that the "enhance" in my use cases.
Give it a try and let us know if any better...
我知道这可能不是您想要的答案,但 bash 在这方面做得更好。和
设置完成忽略大小写
它会做你想做的事。
I know it probably not the answer you wanted, but bash is better at this. With
set completion-ignore-case on
it does what you want.