Tcsh Complete

1、Tcsh Complete 参考

最近在研究tcsh的补全相关知识,于是将相关资料列出来,然后加以分析,据我所知,目前相关的材料大多是英文的,而且百度搜索出来匹配结果较差,而国内又不方便用谷歌,故写出来记录一下:

文件编辑位置: etc/csh.tcshrc· 有的是.cshrc 或者 ~/.tcshrc

本文主要涉及tcsh的补全:
模板:

complete [command [word/pattern/list[:select]/[[suffix]/] …]]

作用:
通过定义一种补全方式,通过输入一部分命令,然后按TAB键,实现将期待的补全列出来,当我们对一些命令较长,而且记不清的时候尤其有用。

首先

complete可以理解为是一个Linux的内建命令或者函数,然后,就是command,理解为当 cd、man、ls、这样的命令。

然后

word部分,就是我们需要给出的补全方式,补全位置?第几个位置补全,如何补全?可选参数如下:


word specifies which word relative to the current word is to be completed, and can be one of the following:
c Current-word completion. pattern is a glob-pattern which must match the beginning of the current word on the command line. pattern is ignored when completing the current word.
C like c, but includes pattern when completing the current word.
n Next-word completion. pattern is a glob-pattern which must match the beginning of the previous word on the command line.
N Like n, but must match the beginning of the word two before the current word.
p Position-dependent completion. pattern is a numeric range, with the same syntax used to index shell variables, which must include the current word.


list

The list of possible completions, which can be one of the following:
a Aliases
b Bindings (editor commands)
d Directories
D Directories which begin with the supplied path prefix
e Environment variables
f File names
F File names which begin with the supplied path prefix

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值