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

Re: completion for darcs



Antoine Calando wrote:
> I also have, sometimes, this kind of problem. Would it be possible to
> add a ZLE widget like "file-complete" (that would be bound, for instance,
> to Ctrl-Tab) which forces the completion to happen in a "basic" way, rather
> than with the new functions-customized system? It is very annoying to have
> to type a full filename...
> 
> Or may be such a widget already exists?

You can actually use the flexibility of the style system and the
_generic widget to do this.

zle -C complete-file complete-word _generic
zstyle ':completion:complete-file::::' completer _files
bindkey '^xF' complete-file

This defines a new widget called "complete-word".  The completer style
in the appropriate context is set to _files, so when invoked it simply
completes file names.  Then it's bound to \C-xF.

There are infinite variations on this.  If you have "From Bash to Zsh",
see pages 405 to 407.

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


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



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