【问题标题】:Extending tcsh completion扩展 tcsh 完成
【发布时间】:2011-09-01 12:33:47
【问题描述】:

我必须使用 tcsh。 我正在使用一个内部工具,它为它的一些命令提供基本的完成。 我想延长完成时间。

我的意思是,在未来的版本中,默认完成可能会演变。

我尝试过这样的事情: 设置 def_cmpl = complete tool

complete tool $def_cmpl 'n/-l/(reg short long gui)/'

但我不明白我得到的结果。 确实,$def_cmpl 中的引号是双引号:

tcsh> complete tool
''n@-t@$script@'' n/-l/(reg short long gui)/'

我尝试了一些使用 echo、sed 等的技巧,但我无法避免那些 ''。

有人可以帮我吗? 请不要说继续bash...该工具不支持它...

【问题讨论】:

    标签: shell tcsh


    【解决方案1】:

    最后,我没有找到将数据保留在脚本中的解决方案。因此,解决方案是将complete 命令的输出重定向到文件中,然后将新行追加到文件中。

    【讨论】:

      猜你喜欢
      • 2022-09-29
      • 1970-01-01
      • 2023-03-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多