Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion in vared
- X-seq: zsh-workers 6138
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: completion in vared
- Date: Wed, 28 Apr 1999 10:59:13 -0700
- In-reply-to: <9904281500.AA34596@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <9904281500.AA34596@xxxxxxxxxxxxxxxxx>
On Apr 28, 5:00pm, Peter Stephenson wrote:
} Subject: completion in vared
}
} Any thoughts about completion in vared? Would it be possible to get it to
} start completion with the context set to _value or _array_value, and
} compstate[parameter] set?
How about something like
function vared {
local _complete_vared=${(Pt)1}
builtin vared "$@"
}
And then somewhere (I'm not familiar enough with it yet to be sure where)
in the completion functions, do
case $_complete_vared in
array|association) compstate[parameter]=$words[1]
compstate[context]=_array_value;;
scalar) compstate[parameter]=$words[1]
compstate[context]=_value;;
*) ;;
esac
Obviously some tweaking is needed to handle "vared -c ..." and so on, but
you get the idea.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author