From: Tanaka Akira <akr@jaist.ac.jp>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: _value
Date: 02 Nov 1999 21:50:41 +0900 [thread overview]
Message-ID: <rsqn1sxawgu.fsf@crane.jaist.ac.jp> (raw)
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=<TAB>
->
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
next reply other threads:[~1999-11-02 12:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-02 12:50 Tanaka Akira [this message]
1999-11-02 14:05 ` Tanaka Akira
1999-11-02 13:00 Sven Wischnowsky
1999-11-02 14:20 ` Tanaka Akira
1999-11-02 15:11 Sven Wischnowsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rsqn1sxawgu.fsf@crane.jaist.ac.jp \
--to=akr@jaist.ac.jp \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).