* Auto-insertion of quotes when completing
@ 2005-06-15 9:44 Ulf Magnusson
0 siblings, 0 replies; only message in thread
From: Ulf Magnusson @ 2005-06-15 9:44 UTC (permalink / raw)
To: zsh-workers
I'm writing a completion for xmms that allows me to complete among all
my music files from the command line. The script that invokes xmms is
called mu, and is used like this:
mu Foo<TAB> -> mu Fooband\ -\ B<TAB> -> mu Fooband\ -\ Barsong
I often prefer to quote the argument to mu, because it looks better
and makes it easier to chose among files whose names contain funny
characters. That is:
mu "Foo<TAB> -> mu "Fooband - B<TAB> -> mu "Fooband - Barsong"
(I chose " instead of ' since ' is a more common character in my
files' names, and \" looks better than '\'' anyway)
I was wondering if there is some way to have the completion
automatically quoted when I first press tab, so that the following
would work:
mu Foo<TAB> -> mu "Fooband - B<TAB> -> etc.
The normal auto-quoting of " when pressing tab should of course still
apply, so the following should be handled correctly:
mu Thi<TAB> -> mu "This song's name has a \" in it"
Is there some (easy) way to do this?
Ulf
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-15 9:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-15 9:44 Auto-insertion of quotes when completing Ulf Magnusson
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).