Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Two missing completion functions that bug me
- X-seq: zsh-workers 13827
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Two missing completion functions that bug me
- Date: Thu, 29 Mar 2001 07:59:36 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
I won't commit these yet (hence they're not presented in diff form); either
Sven can add them at the Great Renaming, or I'll add them after it happens.
The only reason for using _arguments in fned is to get "no more arguments"
behavior after the first name is completed; otherwise it could simply
call _functions directly.
---- 8< ---- _zed ---- 8< ---
#compdef zed fned
case $service in
(fned) _arguments ':shell function:_functions';;
(zed) _arguments '(-):file:_files' \
'(:)-f[edit function]:shell function:_functions';;
esac
---- 8< ---- _zed ---- 8< ---
When adding this next one, remember to remove vared from _vars.
---- 8< ---- _vared ---- 8< ---
#compdef vared
_arguments -s -A '-*' ':parameter spec:_vars' \
'(-A)-a[edit array parameter]:parameter name:_parameters -g array\*' \
'(-a)-A[edit associative array]:parameter name:_parameters -g assoc\*' \
'-c+[create parameter or change type]' \
'-h+[enable history]' \
'-e+[exit on EOF (^D)]' \
'-p[specify left prompt]:prompt string:' \
'-r[specify right prompt]:prompt string:'
---- 8< ---- _vared ---- 8< ---
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author