如何在 Linux 上连接 tcsh 的 TAB 完成功能
我有一些目录,其中包含许多“隐藏”文件。 一个例子是我位于源代码控制的沙箱中,并且某些文件尚未检出。
当我点击 TAB 时,我想要查看这些文件的选项。
之前曾提出过类似的问题:Linux 下模块的 CVS Tab 补全 这个问题的答案总结为:“Ubuntu 内置了这个”。
我无法选择切换到 Ubuntu,但我当然可以使用相同的机制。
- 我怎样才能连接到 tcsh 的 TAB 完成功能来添加附加文件 对 CVS、SVN 和 BitKeeper 的支持都会很有用。
- 比支持特定源代码控制系统更重要的是能够自己控制返回的列表。
- 一个可接受的解决方案是使用 TAB 以外的键绑定。 (ctrl-也许)
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.
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".
I don't have the option of switching to Ubuntu, but surely I can use the same mechanisms.
- how can I hook into the TAB-completion feature of tcsh to add additional file Support for CVS, SVN and BitKeeper would all be useful.
- More important than support for a specific source control system is the ability to control the returned list myself.
- An acceptable solution would also be to use a key-binding other than TAB. (ctrl- perhaps)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不知道如何在 tcsh 中编程。 但是如果可以的话,您可以从存档中查看名为“bash_completion”的文件(找到下载链接 here。)
第 1673 行开始 CVS 完成代码 - 如果您熟悉 bash/tcsh 之间的差异,这可能可以移植到 csh。
在我的 ubuntu 机器上,还有一个 SVN 完成部分(在 /etc/bash_completion 中),但维护者的存档中似乎没有。
I do not know how to program in tcsh. But if you can, then you could look at the file named "bash_completion" from the archive (find the download link here.)
On line 1673 begins CVS completion code - and this might be portable to csh if you are familiar with the differences between bash/tcsh.
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.
从联机帮助页:
可能会帮助您入门
From the manpage:
might get you started
这不是 Ubuntu 特有的行为,而是
bash-completion
项目。如果您可以从 tcsh 切换到 bash,您可以使用它。
That's not Ubuntu-specific behavior, it's the
bash-completion
project.You could use that, if you can switch from tcsh to bash.