From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28986 invoked from network); 2 Nov 1999 12:51:09 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Nov 1999 12:51:09 -0000 Received: (qmail 23660 invoked by alias); 2 Nov 1999 12:50:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8487 Received: (qmail 23652 invoked from network); 2 Nov 1999 12:50:43 -0000 To: zsh-workers@sunsite.auc.dk Subject: PATCH: _value MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 02 Nov 1999 21:50:41 +0900 Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) I wrote _value to complete values for parameter assignments. And I found a problem with this. When I try the completion by _value first time, it is failed and "funcstack wrapper with wrong function" is displayed. Since second time, there is no problem. Z(2):akr@is27e1u11% Src/zsh -f is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst is27e1u11% compconf group_matches=yes message_format='%d' description_format='%d' is27e1u11% compconf describe_options=yes describe_values=yes option_prefix=yes is27e1u11% A= -> is27e1u11% A=funcstack wrapper with wrong function --- /dev/null Tue Nov 2 21:12:50 1999 +++ Completion/Base/_value Tue Nov 2 16:05:52 1999 @@ -0,0 +1,31 @@ +#compdef -value- + +_value () { + #_view_completion_parameters + if (( $+functions[_value:$compstate[parameter]] )); then + "_value:$compstate[parameter]" "$@" + else + _default + fi +} + +_value:CPPFLAGS () { + compset -q + if compset -P '-I'; then + _files -/ "$@" + else + _default "$@" + fi +} + +_value:LDFLAGS () { + compset -q + if compset -P '-L'; then + _files -/ "$@" + elif compset -P '-R'; then + compset -P '*:' + _files -/ -S/ -r ' :' "$@" + else + _default "$@" + fi +} -- Tanaka Akira