Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Tip of the day: previous command output
- X-seq: zsh-users 7894
- From: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Tip of the day: previous command output
- Date: Fri, 20 Aug 2004 14:12:02 +0200
- In-reply-to: <Pine.LNX.4.61.0408190956440.9464@xxxxxxxxxxxxxxxxxx>
- Kinfo: virscan ok
- Kinfo: NoRelay, NoSpam
- Kreccount: 1
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040819085812.GL22962@localhost> <Pine.LNX.4.61.0408190748530.9464@xxxxxxxxxxxxxxxxxx> <20040819164250.GA21575@xxxxxxxxx> <Pine.LNX.4.61.0408190956440.9464@xxxxxxxxxxxxxxxxxx>
One more question for the gurus:
Now that I've got the list of lines (typically filenames) in $kept
how do I get them into the command line _quoted_.
I tried:
insert-kept-result () {
[[ -n "$kept" ]] && LBUFFER+=${(qqq)kept}
}
zle -N insert-kept-result
bindkey '\er' insert-kept-result
But that puts quotes around the whole list of filenames instead of quotes
around every single filename, like so:
"foo bar baz" instead of "foo" "bar" "baz"
Actually, ideally I'd like only filenames with spaces and special chars to
be quoted to avoid cluttering up the command line, but I assume that's even
tougher to do. :-(
Thanks,
Andy.
--
o _ _ _
------- __o __o /\_ _ \\o (_)\__/o (_) -o)
----- _`\<,_ _`\<,_ _>(_) (_)/<_ \_| \ _|/' \/ /\\
---- (_)/ (_) (_)/ (_) (_) (_) (_) (_)' _\o_ _\_v
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mitchell's Law of Committees:
Any simple problem can be made insoluble if enough meetings are
held to discuss it.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author