Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: compgen-like functionality



On Wed, 2 Jul 2008 03:45:20 -0500
brian <brianchina60221@xxxxxxxxx> wrote:
> xmonad, a tiling window manager, currently uses bash compgen(1) for
> tab completion in one of its extensions, a prompt for running
> commands. Is there a way to get zsh to do something like compgen so it
> can be used by other programs?

You need to call the function bashcompinit.  The documentation from
the zshcompsys manual says:

      bashcompinit
              This function provides compatibility  with  bash’s  programmable
              completion system.  When run it will define the functions, comp-
              gen and complete which correspond to the bash builtins with  the
              same names.  It will then be possible to use completion specifi-
              cations and functions written for bash.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author