From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23570 invoked by alias); 7 Jun 2012 04:53:46 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30501 Received: (qmail 11679 invoked from network); 7 Jun 2012 04:53:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.160.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ZzZAe6eG655X2dime2LLPYHh8kDnbtEba5q8Do9f8fQ=; b=fO+spmkScmauwKkGV1yqQ2Uvli0GBfF1BFxHnoRgHOC/YF7Gkm+qRugTHn4bwrKra4 6sqq+bmuEavFPt1xMvu+p/0CCZdf3r047pF1uyjHGDbdq8M9i6WpcT1c+vyl2pUAsKjo 0+7DDSOv0t6XfPqQ3pGY7LHoQ8WPLupjlrQW0PfF3DRRpWvCzxoAw/+riVT71wGSvXJt 3IGaxRKxW/dflCDKfxHpBVMYK0u4h11NW7FqGM0rxY5H/KcDzE0+4Kx4E8O6h1pw8cZw xCiSG2JDbg2hKYCTPetsye8/RN/JDI0+1RNfBIfxRPLPBhpDttdhjH7Lx7TJQ0y+jq5Y zSeg== MIME-Version: 1.0 In-Reply-To: <120606211954.ZM7057@torch.brasslantern.com> References: <4FC5B2CB.6090701@gmail.com> <120530075824.ZM6547@torch.brasslantern.com> <4FCFA55E.4090606@gmail.com> <120606211954.ZM7057@torch.brasslantern.com> Date: Thu, 7 Jun 2012 06:53:39 +0200 Message-ID: Subject: Re: Keybindings lost in Xterm after top exits From: Mikael Magnusson To: Bart Schaefer Cc: Edgar Merino , "zsh-workers@zsh.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 7 June 2012 06:19, Bart Schaefer wrote: > On Jun 6, =C2=A01:45pm, Edgar Merino wrote: > } > } I would like to wrap top within a function, however I don't know how to > } set the mode back to normal mode from a script, can you point me to any > } source where I could investigate on how to this? > > It should work to do this: > > =C2=A0 =C2=A0zmodload zsh/terminfo > =C2=A0 =C2=A0top() { > =C2=A0 =C2=A0 =C2=A0command top "$@" > =C2=A0 =C2=A0 =C2=A0print -r "${terminfo[rmkx]}" > =C2=A0 =C2=A0} You probably want to either add -n to the prints, or just use echoti rmkx instead. (echotc for the $termcap ones). --=20 Mikael Magnusson