如何在 Linux 上连接 tcsh 的 TAB 完成功能

发布于 2024-07-23 22:59:11 字数 486 浏览 3 评论 0原文

我有一些目录,其中包含许多“隐藏”文件。 一个例子是我位于源代码控制的沙箱中,并且某些文件尚未检出。

当我点击 TAB 时,我想要查看这些文件的选项。

之前曾提出过类似的问题:Linux 下模块的 CVS Tab 补全 这个问题的答案总结为:“Ubuntu 内置了这个”。

我无法选择切换到 Ubuntu,但我当然可以使用相同的机制。

  1. 我怎样才能连接到 tcsh 的 TAB 完成功能来添加附加文件 对 CVS、SVN 和 BitKeeper 的支持都会很有用。
  2. 比支持特定源代码控制系统更重要的是能够自己控制返回的列表。
  3. 一个可接受的解决方案是使用 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.

  1. 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.
  2. More important than support for a specific source control system is the ability to control the returned list myself.
  3. An acceptable solution would also be to use a key-binding other than TAB. (ctrl- perhaps)

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

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

发布评论

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

评论(3

习ぎ惯性依靠 2024-07-30 22:59:11

我不知道如何在 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.

撩心不撩汉 2024-07-30 22:59:11

从联机帮助页:

complete 内置命令可用于告诉 shell 如何完成除文件名、命令和变量之外的单词

可能会帮助您入门

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

苹果你个爱泡泡 2024-07-30 22:59:11

这不是 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.

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