Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Auto-insertion of quotes when completing
- X-seq: zsh-workers 21342
- From: Ulf Magnusson <ulfalizer@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Auto-insertion of quotes when completing
- Date: Wed, 15 Jun 2005 11:44:28 +0200
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=PLyeozwdH+b8EzU87h4IpQTwLl+sFGYbaz+35KcT51SmpR/+Ktoc0IUubOMakpOyYvmWrljg2Qks1ud1VBvQpn2KX5z3P36h8o0kzosj1ncLPzSrjijST9KLdXvqWduNKaW6CcptnTXw3L5xQnaFqxCu/aT9f+/YxauEUAwCGu4=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Reply-to: Ulf Magnusson <ulfalizer@xxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author