开发者

Extending tcsh completion

I must work with 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

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

But I don't understand the resul开发者_高级运维t I get. Indeed, the quotes inside $def_cmpl are doubled:

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 ''.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜