cshell tab补全,不区分大小写

发布于 2024-09-10 13:44:56 字数 115 浏览 7 评论 0原文

对于 C Shell,有没有一种方法可以使命令、文件等的制表符补全不区分大小写?

我看到了 complete=enhance 变量,但这仅适用于 tcsh,不适用于 csh。

For C Shell is there a way to make tab completion for commands, files etc. case insensitive?

I saw the complete=enhance variable, but that is only for tcsh, not csh.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

回忆凄美了谁 2024-09-17 13:44:56
set autolist = ambiguous 
set complete = enhance 
set autolist = ambiguous 
set complete = enhance 
只为守护你 2024-09-17 13:44:56

这是针对超级新手的更详细的答案:

Ratheesh Pai 的答案是正确的,但如果您希望设置保留,则需要将命令写入 .cshrc 文件。每当您打开 shell 时都会执行此文件(假设 .cshrc 文件位于您的主目录中。将 .cshrc 文件视为设置文件 - 您可以添加任何内容您想要的个人偏好...

以下是如何设置选项卡完成:

cd ~
vim .cshrc

将以下两行插入 .cshrc

set autolist = ambiguous 
set complete = enhance

然后退出 VIM

最后,重新打开 shell(或获取 源代码)。 >.cshrc 文件):

source ./.cshrc

然后试一试,您应该能够完成不区分大小写的制表符。

Here's a more verbose answer for the uber newbs:

Ratheesh Pai's answer is correct, but if you want the settings to persist, you want to write the commands to your .cshrc file. This file is executed any time you open a shell (assuming the .cshrc file is in your home directory. Think of the .cshrc file as a settings file - you add whatever personal preferences you want into it...

Here's how to setup tab completion:

cd ~
vim .cshrc

Insert in the two lines below into .cshrc

set autolist = ambiguous 
set complete = enhance

Then quit VIM.

Last, either re-open your shell (or source the .cshrc file):

source ./.cshrc

Then give it a shot, you should be able to case-insensitive tab complete.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文