zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@sunsite.dk
Subject: Re: Bug#519535: history expansion: modifier completion missing
Date: Thu, 19 Mar 2009 16:28:55 +0100	[thread overview]
Message-ID: <237967ef0903190828k4b9f7edbyc85405b630c50d5d@mail.gmail.com> (raw)
In-Reply-To: <20090316181852.27e9420d@news01>

2009/3/16 Peter Stephenson <pws@csr.com>:
> On Sun, 15 Mar 2009 06:22:53 +0000
> Clint Adams <schizo@debian.org> wrote:
>> On Fri, Mar 13, 2009 at 11:55:55AM +0100, martin f krafft wrote:
>> > I tried to show off zsh to a sceptic today and had to find out the
>> > hard way that it does not (yet) provide completion for history
>> > expansion modifiers, e.g.
>> >
>> >   echo !$:<TAB>
>
> I thought this was going to be harder than it turned out to be; as you can
> see it's really quite simple, particularly since I already wrote modifer
> completion and it would appear had the foresight to make it handle the
> history case.
>
> It's in _normal which is where we handle normal command arguments.  I think
> this is both the first and last place where get to massage command line
> arguments generically---we don't just want this in default completion since
> history expansion, if active, trumps everything else.
[...]
> So it seems to work fine (possibly depending on your options and
> completers---there are other things around that will do other things to
> !'s), but I'm still a bit confused.

Is it supposed to work here? $PWD:<tab> (it doesn't for me). It does
complete if you write $PWD(:<tab>, but also in ${PWD(:<tab>, but
accepting one of the latter produces a syntax error:
% echo ${PWD(:A)}
zsh: bad substitution
(regardless of which modifier you use)

Also, i get this:
$PWD(:s-<tab>
_history_modifiers:34: bad math expression: operand expected at `^-'
_history_modifiers:34: bad math expression: operand expected at `^-'
_history_modifiers:34: bad math expression: operand expected at `^-'
_history_modifiers:34: bad math expression: operand expected at `^-'
_history_modifiers:34: bad math expression: operand expected at `^-'
_history_modifiers:34: bad math expression: operand expected at `^-'
(same with / or other separator (but it says `^/' then, of course))

As an aside, after i write $PWD(:<tab> to get the s, how do i "accept"
the completion to make tab complete the - instead of cycling to the
next completer? The only way i found is typing something and deleting
it... When completing directories i usually just type a /.

-- 
Mikael Magnusson


  parent reply	other threads:[~2009-03-19 15:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090313105555.GA19025@piper.oerlikon.madduck.net>
2009-03-15  6:22 ` Clint Adams
2009-03-16 18:18   ` Peter Stephenson
2009-03-17  2:44     ` Bart Schaefer
2009-03-17  9:57       ` Peter Stephenson
2009-03-17 11:00         ` Peter Stephenson
2009-03-17 12:09           ` Peter Stephenson
2009-03-17 17:36         ` Bart Schaefer
2009-03-17 18:46         ` Modifiers, command position, and so forth (Re: Bug#519535: history expansion: modifier completion missing) Bart Schaefer
2009-03-18 19:36           ` Peter Stephenson
2009-03-19  0:34             ` Bart Schaefer
2009-03-19 14:34             ` Peter Stephenson
2009-03-19 15:28     ` Mikael Magnusson [this message]
2009-03-19 16:09       ` Bug#519535: history expansion: modifier completion missing Peter Stephenson
2009-03-19 16:18         ` Mikael Magnusson
2009-03-19 16:18       ` Bart Schaefer

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=237967ef0903190828k4b9f7edbyc85405b630c50d5d@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@sunsite.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).