From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9798 invoked from network); 20 Aug 2004 13:15:21 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 20 Aug 2004 13:15:21 -0000 Received: (qmail 46436 invoked from network); 20 Aug 2004 13:15:15 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Aug 2004 13:15:15 -0000 Received: (qmail 6614 invoked by alias); 20 Aug 2004 12:14:29 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7894 Received: (qmail 6604 invoked from network); 20 Aug 2004 12:14:28 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 20 Aug 2004 12:14:28 -0000 Received: (qmail 3143 invoked from network); 20 Aug 2004 12:12:33 -0000 Received: from lyta.akte.de (217.160.134.217) by a.mx.sunsite.dk with SMTP; 20 Aug 2004 12:12:31 -0000 Received: (root@lyta.akte.de) by lyta.akte.de id ; Fri, 20 Aug 2004 14:12:12 +0200 KRecCount: 1 KInfo: virscan ok KInfo: NoRelay, NoSpam Received: from condor.int.spiegl.de (pD9E93A0E.dip.t-dialin.net [217.233.58.14]) by lyta.akte.de via kasmail (2.9) id ; Fri, 20 Aug 2004 12:12:05 GMT Received: from condor.int.spiegl.de (spiegl@localhost [127.0.0.1]) by condor.int.spiegl.de (8.12.11.Beta0/8.12.11.Beta0/Debian-1) with ESMTP id i7KCC2gH031744 for ; Fri, 20 Aug 2004 14:12:02 +0200 Received: (from spiegl@localhost) by condor.int.spiegl.de (8.12.11.Beta0/8.12.11.Beta0/Debian-1) id i7KCC2Lc031742 for zsh-users@sunsite.dk; Fri, 20 Aug 2004 14:12:02 +0200 X-Authentication-Warning: condor.int.spiegl.de: spiegl set sender to zsh.Andy@spiegl.de using -f Date: Fri, 20 Aug 2004 14:12:02 +0200 From: Andy Spiegl To: zsh-users@sunsite.dk Subject: Re: Tip of the day: previous command output Message-ID: <20040820121202.GA31466@spiegl.de> Mail-Followup-To: zsh-users@sunsite.dk References: <20040819085812.GL22962@localhost> <20040819164250.GA21575@spiegl.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-PGP-GPG-Keys: mail -s "send pgp" auto@spiegl.de X-Accepted-File-Formats: ASCII .rtf .ps .pdf - *NO* MS Office files please. X-why-you-shouldnt-use-MS-LookOut: http://www.jensbenecke.de/l-oe-en.php X-warum-man-MS-Outlook-vermeiden-sollte: http://www.jensbenecke.de/l-oe-de.php X-Message-Flag: LookOut! You are using an insecure mail reader which can be used to spread viruses. User-Agent: Mutt/1.5.5.1+cvs20040105i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.1 required=6.0 tests=BAYES_01,RCVD_IN_NJABL, RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 0.1 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.