我有一个用于Apache Hadoop的bash-tab完成脚本。通常,我使用zsh作为我的日常shell。当我需要它时,它往往是漂亮的bash样,但它看起来像制表符完成系统是完全不同的。有没有一种简单的方法来“转换”现有的bash-tab-completion定义在zsh中工作?我不想在这里投入大量的时间,但如果这很容易,我会节省一个中等的努力。
由
this page(日期为2010/01/05):
原文链接:https://www.f2er.com/bash/391387.htmlZsh can handle bash completions functions. The latest development version of zsh has a function bashcompinit,that when run will allow zsh to read bash completion specifications and functions. This is documented in the zshcompsys man page. To use it all you need to do is run bashcompinit at any time after compinit. It will define complete and compgen functions corresponding to the bash builtins.