zsh-users
 help / color / mirror / code / Atom feed
* complete all "cvs add" matches
@ 2002-10-21 13:42 Louis-David Mitterrand
  2002-10-21 14:27 ` Oliver Kiddle
  2002-10-21 15:00 ` Bart Schaefer
  0 siblings, 2 replies; 8+ messages in thread
From: Louis-David Mitterrand @ 2002-10-21 13:42 UTC (permalink / raw)
  To: zsh users


Hi,

Let's say I have 3 files in a cvs repository that I want to "cvs add",
so I type:

% cvs add <TAB>

Since I have activated cvs completion, zsh offers to "add" only these 3
files, which appear under my command line.

How can I get these 3 file names on the command line? Right now I press
<TAB> again to insert the first match and have to "cvs add" once for
each file.

I have looked in zsh-doc (debian unstable) section 17.6.5 without
finding the magic key combination that would _all_ desired completion
matches on the command line.

Cheers,

-- 
    PHEDRE: Vivons, si vers la vie on peut me ramener,
            Et si l'amour d'un fils en ce moment funeste
            De mes faibles esprits peut ranimer le reste.
                                          (Phèdre, J-B Racine, acte 1, scène 5)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: complete all "cvs add" matches
  2002-10-21 13:42 complete all "cvs add" matches Louis-David Mitterrand
@ 2002-10-21 14:27 ` Oliver Kiddle
  2002-10-21 14:45   ` Louis-David Mitterrand
  2002-10-21 15:00 ` Bart Schaefer
  1 sibling, 1 reply; 8+ messages in thread
From: Oliver Kiddle @ 2002-10-21 14:27 UTC (permalink / raw)
  To: Louis-David Mitterrand; +Cc: zsh users

On 21 Oct, you wrote:
> 
> Let's say I have 3 files in a cvs repository that I want to "cvs add",
> so I type:
> 
> % cvs add <TAB>
> 
> Since I have activated cvs completion, zsh offers to "add" only these 3
> files, which appear under my command line.
> 
> How can I get these 3 file names on the command line? Right now I press
> <TAB> again to insert the first match and have to "cvs add" once for
> each file.

This can be done by adding
  compstate[insert]=all
to the end of _cvs_add. I'm not keen on doing this in the distributed
_cvs but you could use your own replacement _cvs_add function.

I don't remember there being a style to do this, perhaps there should
be one.

You might also want to have a look at the _all_matches completer. Don't
be tempted to try to bind the _all_matches completer to the specific
context of cvs-add with zstyle though because completers are determined
long before the context is elaborated to that level of detail and it
won't work. Personally, I bind a key to it which I can use in situations
such as this. The necessary lines from my .zshrc being these:

bindkey '^Xx' all-matches
zstyle ':completion:all-matches::::' completer _all_matches _complete
zstyle ':completion:all-matches:*' old-matches true
zstyle ':completion:all-matches:*' insert true
zle -C all-matches complete-word _generic

Oliver


This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: complete all "cvs add" matches
  2002-10-21 14:27 ` Oliver Kiddle
@ 2002-10-21 14:45   ` Louis-David Mitterrand
  0 siblings, 0 replies; 8+ messages in thread
From: Louis-David Mitterrand @ 2002-10-21 14:45 UTC (permalink / raw)
  To: Oliver Kiddle; +Cc: zsh users

On Mon, Oct 21, 2002 at 03:27:38PM +0100, Oliver Kiddle wrote:
> On 21 Oct, you wrote:
> > 
> > Let's say I have 3 files in a cvs repository that I want to "cvs add",
> > so I type:
> > 
> > % cvs add <TAB>
> > 
> > Since I have activated cvs completion, zsh offers to "add" only these 3
> > files, which appear under my command line.
> > 
> > How can I get these 3 file names on the command line? Right now I press
> > <TAB> again to insert the first match and have to "cvs add" once for
> > each file.
> 
> This can be done by adding
>   compstate[insert]=all
> to the end of _cvs_add. I'm not keen on doing this in the distributed
> _cvs but you could use your own replacement _cvs_add function.
> 
> I don't remember there being a style to do this, perhaps there should
> be one.
> 
> You might also want to have a look at the _all_matches completer. Don't
> be tempted to try to bind the _all_matches completer to the specific
> context of cvs-add with zstyle though because completers are determined
> long before the context is elaborated to that level of detail and it
> won't work. Personally, I bind a key to it which I can use in situations
> such as this. The necessary lines from my .zshrc being these:
> 
> bindkey '^Xx' all-matches
> zstyle ':completion:all-matches::::' completer _all_matches _complete
> zstyle ':completion:all-matches:*' old-matches true
> zstyle ':completion:all-matches:*' insert true
> zle -C all-matches complete-word _generic

This works beautifully, thanks a lot!

-- 
    ARICIE: De votre injuste haine il n'a pas hérité ;
            Il ne me traitait point comme une criminelle.
                                          (Phèdre, J-B Racine, acte 5, scène 3)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: complete all "cvs add" matches
  2002-10-21 13:42 complete all "cvs add" matches Louis-David Mitterrand
  2002-10-21 14:27 ` Oliver Kiddle
@ 2002-10-21 15:00 ` Bart Schaefer
  2002-10-21 15:04   ` Roman Neuhauser
  2002-10-22  2:34   ` John Buttery
  1 sibling, 2 replies; 8+ messages in thread
From: Bart Schaefer @ 2002-10-21 15:00 UTC (permalink / raw)
  To: zsh users

I tried to reply to this, but apartia.org rejected my message because I'm
using a Verizon DSL account ("too much spam from verizon already").

I dislike spam as much as the next person, but I have zero sympathy for
the "collateral damage" crowd.  If you don't want my mail, you don't get
my help.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: complete all "cvs add" matches
  2002-10-21 15:00 ` Bart Schaefer
@ 2002-10-21 15:04   ` Roman Neuhauser
  2002-10-21 15:22     ` Bart Schaefer
  2002-10-22  2:34   ` John Buttery
  1 sibling, 1 reply; 8+ messages in thread
From: Roman Neuhauser @ 2002-10-21 15:04 UTC (permalink / raw)
  To: zsh users

# schaefer@brasslantern.com / 2002-10-21 15:00:13 +0000:
> I tried to reply to this, but apartia.org rejected my message because I'm
> using a Verizon DSL account ("too much spam from verizon already").
> 
> I dislike spam as much as the next person, but I have zero sympathy for
> the "collateral damage" crowd.  If you don't want my mail, you don't get
> my help.

    I wanted to ask the same question as the OP for a couple of weeks,
    and don't block the whole Verizon. will you post so that *i* can
    read it?

    :)

-- 
If you cc me or take the list(s) out completely I'll most likely
ignore your message.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: complete all "cvs add" matches
  2002-10-21 15:04   ` Roman Neuhauser
@ 2002-10-21 15:22     ` Bart Schaefer
  0 siblings, 0 replies; 8+ messages in thread
From: Bart Schaefer @ 2002-10-21 15:22 UTC (permalink / raw)
  To: zsh users

On Oct 21,  5:04pm, Roman Neuhauser wrote:
} Subject: Re: complete all "cvs add" matches
}
}     I wanted to ask the same question as the OP for a couple of weeks,
}     and don't block the whole Verizon. will you post so that *i* can
}     read it?

Fortunately Oliver has saved me the trouble; I don't have anything to add
to what he posted, except to point to the similar example in the doc for
_all_matches.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: complete all "cvs add" matches
  2002-10-21 15:00 ` Bart Schaefer
  2002-10-21 15:04   ` Roman Neuhauser
@ 2002-10-22  2:34   ` John Buttery
  2002-10-22 15:43     ` Off-topic not really " Bart Schaefer
  1 sibling, 1 reply; 8+ messages in thread
From: John Buttery @ 2002-10-22  2:34 UTC (permalink / raw)
  To: zsh users

[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]

* Bart Schaefer <schaefer@brasslantern.com> [2002-10-21 15:00:13 +0000]:
> I tried to reply to this, but apartia.org rejected my message because I'm
> using a Verizon DSL account ("too much spam from verizon already").
> 
> I dislike spam as much as the next person, but I have zero sympathy for
> the "collateral damage" crowd.  If you don't want my mail, you don't get
> my help.

  Well, not to go too far off-topic, but I don't think the "collateral
damage" people really like it either...but when you have to upgrade your
SMTP infrastructure just to deal with spam, it starts to focus your
attention a little.
  This isn't a flame, even though it probably sounds like one, but I'll
tell you what _I_ dislike; people who continue to pay known
spam-friendly ISPs for Internet access and then imply that it's the
other end's problem when their mail is blocked. 

-- 
------------------------------------------------------------------------
 John Buttery

                 "Man, that Shaft is a bad mutha..."
                          "Shut yo' mouth!"
                  "I'm just talkin' 'bout Shaft..."

                                     (Web page temporarily unavailable)
------------------------------------------------------------------------

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Off-topic not really Re: complete all "cvs add" matches
  2002-10-22  2:34   ` John Buttery
@ 2002-10-22 15:43     ` Bart Schaefer
  0 siblings, 0 replies; 8+ messages in thread
From: Bart Schaefer @ 2002-10-22 15:43 UTC (permalink / raw)
  To: zsh users

On Oct 21,  9:34pm, John Buttery wrote:
}
}   This isn't a flame, even though it probably sounds like one, but I'll
} tell you what _I_ dislike; people who continue to pay known
} spam-friendly ISPs for Internet access and then imply that it's the
} other end's problem when their mail is blocked. 

Just for the record, and then I'll shut up since this is off-topic and I
see enough of this sort of argument on the spamassassin list already ...

(1) If there were another broadband ISP in my area, I'd have used it.
    Unfortunately verizon effectively has a monopoly here because they
    bought the local phone company, the only other DSL provider went
    bankrupt, and my neighborhood does not have line-of-sight to any
    wireless towers.

(2) It's the other end's problem if and only if they want to get my mail.
    I simply refuse to go out of my way to work around the blockage.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-10-22 15:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-21 13:42 complete all "cvs add" matches Louis-David Mitterrand
2002-10-21 14:27 ` Oliver Kiddle
2002-10-21 14:45   ` Louis-David Mitterrand
2002-10-21 15:00 ` Bart Schaefer
2002-10-21 15:04   ` Roman Neuhauser
2002-10-21 15:22     ` Bart Schaefer
2002-10-22  2:34   ` John Buttery
2002-10-22 15:43     ` Off-topic not really " Bart Schaefer

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).