From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22639 invoked from network); 4 Mar 2000 16:38:23 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Mar 2000 16:38:23 -0000 Received: (qmail 24802 invoked by alias); 4 Mar 2000 16:38:08 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2945 Received: (qmail 24786 invoked from network); 4 Mar 2000 16:38:06 -0000 From: "Bart Schaefer" Message-Id: <1000304163801.ZM24423@candle.brasslantern.com> Date: Sat, 4 Mar 2000 16:38:01 +0000 In-Reply-To: =?iso-8859-1?Q?=3C20000304130547=2ED1805=40picard=2Efranken?= =?iso-8859-1?Q?=2Ede=3E?= =?iso-8859-1?Q?Comments=3A_In_reply_to_Thomas_K=F6hler_=3Cjean-luc=40pica?= =?iso-8859-1?Q?rd=2Efranken=2Ede=3E?= =?iso-8859-1?Q?________=22Re=3A_zsh_tips_for_=22UNIX_Power_Tools=22=22_?= =?iso-8859-1?Q?=28Mar__4=2C__1=3A05pm=29?= References: <28174.952013581@jpeek.com> <20000303123932.A11036@picard.franken.de> <87k8jjwt6h.fsf@cenderis.demon.co.uk> <1000304054014.ZM21187@candle.brasslantern.com> <20000304130547.D1805@picard.franken.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-users@sunsite.auc.dk Subject: Re: zsh tips for "UNIX Power Tools" Cc: Jerry Peek MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On Mar 4, 1:05pm, Thomas K=F6hler wrote: } Subject: Re: zsh tips for "UNIX Power Tools" } } Of course [...] I put in a lot of extra details for Jerry's benefit. } > # requires setopt prompt_subst } > PROMPT=3D"$PROMPT"'%{$(show_mode INSERT >/dev/tty)%}' } > = } > Now the prompt itself runs the initial show_mode, and you don't need = any } > background jobs run from precmd. } = } Well, OK so far - but the indication still ends up in the wrong place show_mode is a function; fiddle with it. E.g. pass the number of lines to move up as a second argument, or pass that second argument only when in the prompt and don't move up a line when $# > 1, or ... } One last thing: Bart, thanks for your cool and incredible tips on this } list. I learned much from you! My pleasure. -- = Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com