[英]How can I hook into tcsh's TAB completion on Linux
I have some directories with a number of "hidden" files. 我有一些带有许多“隐藏”文件的目录。 One example of this is I'm in a source controlled sandbox and some of the files have not been checked out yet.
其中一个示例是我在源代码控制的沙箱中,并且某些文件尚未签出。
When I hit TAB, I'd like the option of seeing these files. 当我点击TAB时,我希望看到这些文件。
A similar question has been asked before: CVS Tab completion for modules under linux The answers to that question summarize to: "Ubuntu's got that built in". 之前也曾提出过类似的问题: Linux下模块的CVS制表符完成对该问题的答案总结为:“ Ubuntu具有内置功能”。
I don't have the option of switching to Ubuntu, but surely I can use the same mechanisms. 我没有选择切换到Ubuntu的选择,但是可以肯定的是,我可以使用相同的机制。
From the manpage: 从联机帮助页:
the complete builtin command can be used to tell the shell how to complete words other than filenames, commands and variables
完整的内置命令可用于告诉外壳程序如何完成除文件名,命令和变量以外的单词
might get you started 可能会让你入门
I do not know how to program in tcsh. 我不知道如何在tcsh中编程。 But if you can, then you could look at the file named "bash_completion" from the archive (find the download link here .)
但是,如果可以,那么您可以查看存档中名为“ bash_completion”的文件(在此处找到下载链接)。
On line 1673 begins CVS completion code - and this might be portable to csh if you are familiar with the differences between bash/tcsh. 1673行开始了CVS完成代码-如果您熟悉bash / tcsh之间的区别,则可以将其移植到csh。
On my ubuntu machine, there is also a section for SVN completion (in /etc/bash_completion) that doesn't seem to be present in the maintainer's archive. 在我的ubuntu机器上,还有一个用于SVN完成的部分(在/ etc / bash_completion中),似乎没有出现在维护者的档案中。
That's not Ubuntu-specific behavior, it's the bash-completion
project. 这不是Ubuntu特有的行为,而是
bash-completion
项目。
You could use that, if you can switch from tcsh to bash. 如果可以从tcsh切换到bash,则可以使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.