zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: zsh-workers@math.gatech.edu
Subject: Re: comments in completion
Date: Mon, 17 Nov 1997 09:13:58 -0800	[thread overview]
Message-ID: <971117091358.ZM26224@candle.brasslantern.com> (raw)
In-Reply-To: <199711171626.LAA04893@math.gatech.edu>

On Nov 17,  4:26pm, Bruce Stephens wrote:
} Subject: Re: comments in completion
}
} schaefer@brasslantern.com said:
} > It'd probably be sufficient to make a variant of -X that applies
} > expansions in the manner of -s. 
} 
} Wouldn't this be a bit clunky with programmable completion?

Depends on order of evaluation. :-)

} Surely if I'm 
} using a function to generate completions (a list of jobs, or a list of 
} suitable hostnames or whatever) then it would be natural to explain them 
} there?

Suppose I have the follwing; assume -Y is the expanding form of -X (mnemonic
is "why" :-) --

    compctl -K somefunc -Y '$somevar' somecommand

    somefunc() {
	reply=(some list of things)
	somevar="Some list of things means something"
    }

Now as long as "somefunc" runs before -Y performs its expansion, the value
of "somevar" is what "somefunc" wanted it to be.  This order of evaluation
ought to be possible, because the results of the function are needed before
zsh can even decide whether to print the explanation.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


      reply	other threads:[~1997-11-17 18:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-16 15:44 Stefan Monnier
1997-11-16 17:26 ` Bart Schaefer
1997-11-17 13:54   ` Bruce Stephens
1997-11-17 15:45     ` Bart Schaefer
1997-11-17 16:26       ` Bruce Stephens
1997-11-17 17:13         ` Bart Schaefer [this message]

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=971117091358.ZM26224@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@math.gatech.edu \
    /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).