From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4425 invoked by alias); 9 Feb 2011 06:20:38 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15779 Received: (qmail 29146 invoked from network); 9 Feb 2011 06:20:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at yahoo.com does not designate permitted sender hosts) X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 565889.66878.bm@omp1054.mail.sp2.yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1297232115; bh=eM0Qn3uHoWlMB4TCtsSNo0bV9VcVOVpS3VUP3lIK5fQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=iilC6AlpT6fbLShSoz56IMeYCLF3u1yi95lB4sMefakHW+YCTwx0Zg6BtRqovz5Mcf78IeKOl8YA4QPgW2MMnIZ9uAxyIhFlElm00XQwAA61KBFzokOg4gv2ywYI+tdkuyVXlMmbQ6GwaIpC8vniZdTGD+FyKEYjomAfEK4lnYA= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=nHfAsnrqoeZAFcI4qY11zce7UMyk+e6crvqS6JhREA7fHZRQp0w9QKozjOU4vPjo0HbXIvBeYAjrqg4PCepl6BxmFyOWFg/NGk8ZYzS38vBskTG4/6yXIHWKeNU/E4PDdHUDpQkyJ1QV8It2KuEumpW70JoVrTWQv9ti5tBXabU=; Message-ID: <96888.89621.qm@web112304.mail.gq1.yahoo.com> X-YMail-OSG: Pff.KlEVM1lyqlPcxdtf3ffLmuvbPmBuaLdj1Ze1xeQJmTh YWeJom464HhOmnrlnQuGfsuqTB0JbpSay3tQTYPnuYgxtjV.z.l__iccy1hN TM.hQLmlGUrtQUIe0tIS.ri4JDk9UEwbJzBluwEjIhGvOqQf2T7_Q4CJDTRh _IEFwvPSRoeu5EyLhH7IG6TI9kL5UfW13tlaXzzeE3PpNRpyOcDvBs5X.wgP MLlp4CLaurR.b3ciCL4fuitiT4HPiCs9D32dI2X_8tbc3.hIHODxdET1sIdC 9xXs1lzh0_pp.4BQhXa3RNdY.eg7B7VOooxC2THRXW1Uu5nmzmtp0kpc0ODs O6_njA6i8fCXxZ7XJYu6IJpSc X-Mailer: YahooMailRC/555 YahooMailWebService/0.8.108.291010 References: <273791.72265.qm@web112305.mail.gq1.yahoo.com> <110208212527.ZM24140@torch.brasslantern.com> Date: Tue, 8 Feb 2011 22:15:14 -0800 (PST) From: Wendell Hom Subject: Re: zle -R does it support color? To: Bart Schaefer , zsh-users@zsh.org In-Reply-To: <110208212527.ZM24140@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1640237176-1297232114=:89621" --0-1640237176-1297232114=:89621 Content-Type: text/plain; charset=us-ascii The way my "completion" widget works is that when it is invoked, it enters a loop and waits for the next key to be pressed. Every time a key is pressed, the new completion list is redisplayed automatically. Some commonly used keys like the Enter key, semicolon, quotes, etc., are also mapped to perform different functions that help move around directories and choosing files. Once control returns from the widget, the normal key bindings are back. It basically cuts down on typing and speeds things up for me. I resorted to simulating the completion using zle -R because I wasn't able to get the completion widget to do what I wanted. I wanted to be able to stay within the widget so that the keys perform different functions. I suppose that can be accomplished instead by binding a key to change key mappings, but I also wanted the completion list to change automatically without having to hit the Tab key each time once I enter this mode. Or if I can find a way to redisplay the completion list w/o returning from the widget, then that should work but I am not sure if that is possible. ________________________________ From: Bart Schaefer To: zsh-users@zsh.org Sent: Tue, February 8, 2011 9:25:27 PM Subject: Re: zle -R does it support color? On Feb 8, 4:29pm, Wendell Hom wrote: } } I am using zle -R to list the file/directory choices that match a } string in the buffer. The script serves its purpose, but I can't seem } to get any color output using zle -R; it displays control characters } instead. Does zle -R support color output? No, zle -R doesn't support any sort of terminal control. ZLE is pretty restrictive of what it will let you do outside of a prompt string, in order that it be able to keep track of what the screen (well, the bit of the screen that it last scribbled on) looks like at all times. It doesn't "know" which escape sequences require zero display space, which ones move the cursor around, etc., so it won't emit any of them. You might be able to do something with POSTDISPLAY and region_highlight but it'd require a fair amount of work. } It would be nice to have a color-coded output so I can easily spot } directories vs. filenames vs symlinks, etc. Out of curiosity, why are you simulating a completion with zle -R rather than doing a real completion list and allowing that to color the results? --0-1640237176-1297232114=:89621--