[英]Extending tcsh completion
I must work with tcsh. 我必须与tcsh合作。 I am using an internal tool that provides basic completion for some of its commands.
我正在使用一个内部工具,该工具为其某些命令提供基本的完成信息。 I would like to extend the completion.
我想延长完成时间。
I mean that in future releases the default completion may evolve. 我的意思是,在将来的版本中,默认完成可能会演变。
I tried something like this: set def_cmpl = complete tool
我尝试过这样的事情:set def_cmpl =
complete tool
complete tool $def_cmpl 'n/-l/(reg short long gui)/'
But I don't understand the result I get. 但是我不明白我得到的结果。 Indeed, the quotes inside
$def_cmpl
are doubled: 实际上,
$def_cmpl
中的引号加倍了:
tcsh> complete tool
''n@-t@$script@'' n/-l/(reg short long gui)/'
I tried some tricks with echo, sed, etc. but I can't avoid those ''. 我尝试了一些回声,sed等技巧,但我无法避免使用这些''。
Could somebody help me? 有人可以帮我吗? Please don't say go on bash... The tool doesn't support it...
请不要说继续进行...该工具不支持...
Finally, I did not find a solution to keep the data inside the script. 最后,我没有找到将数据保留在脚本中的解决方案。 So, the solution was to redirect the output of the
complete
command inside a file and then to append new lines to the file. 因此,解决方案是在文件中重定向
complete
命令的输出,然后将新行添加到文件中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.