From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29262 invoked by alias); 10 Mar 2011 00:29:31 -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: 15857 Received: (qmail 19976 invoked from network); 10 Mar 2011 00:29:29 -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: 110827.93718.bm@omp1035.mail.ne1.yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1299716558; bh=b5h68FHazsV+5tF8yVGYTzfMcZQZPZZI8yMOtTAx4F4=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=KRo2c/qz68z4m0Jdi+YEeABXFiUHjJ+UHjz7MCXG98n1BycKL+cnv0KMNTWW3o5FdqqBLc5Yqev9a0nYpEMZmcFeiFuuQbgPEPBX1Iwf8l4z5+CznrSJS2CdRYbctcZ8LoUy651JX+W1dXuQACkuG50ynPd1+gJzTfXU9/jqaGI= 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:Cc:In-Reply-To:MIME-Version:Content-Type; b=Ygfs2a4Mk4hNRorikCXSPCZCLlzdqkgnP7ZBUkIGtfx1/zfFFa9jLvUUPn34mCTilBxXD+SXPEqoS9dGwftcXzX4teQQO8BimgKIttzt6hMe6jz/mc8qJKZlhHlJpiz+AloZxbaVWf5bgoUM7CV16mtt9aGehOblXtUZOlu0XsI=; Message-ID: <461734.26531.qm@web112316.mail.gq1.yahoo.com> X-YMail-OSG: tYi_ZFoVM1m4SoRmTt_L4kGuC4ZYZxaLb3n2ZdPJSCEmdq7 arLv.hKc9niTGJPPgSIAvlzi1mYQRykAEgmPiLzcVnst2xaLuBGKqla46Jgf PoHFmOMZp4QMvQ4TrWmQrm.oq4MYGQUvldv3_bisuJHUwNWJDBt45Acgp96. 385P__Caei4z8EhMwxtkWecC9vS_RMZJgTTNYOwW7vp2YisXpZjMBuJkbtKK zp16U2tqheg3HEzaG1Du6fpERVziwRXDsOECQPcvtyz2UzY77bU5QBes3jz0 tE.CB3EEKBzVwp4dje.jZCRDVYZglW6pFlC0RBN0LqHzG042ZJuDDdV2LHuh UimR8_M.izdF0IYGL0mqZNpEV X-Mailer: YahooMailRC/559 YahooMailWebService/0.8.109.292656 References: <34287570baba3024c8cffea8be3da248.squirrel@gameframe.net> Date: Wed, 9 Mar 2011 16:22:38 -0800 (PST) From: Wendell Hom Subject: Re: ZSH's way to bind function to a key in a script? To: =?utf-8?B?SsOpcsOpbWllIFJvcXVldA==?= , zsh-users@zsh.org Cc: nix@myproxylists.com In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-463104183-1299716558=:26531" --0-463104183-1299716558=:26531 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable When using "read -k key"=0A=0AI am matching against normal keys with=0Aif= [ $key =3D '?' ]=0A=0Asimple control characters like tabs with=0Aif (( #ke= y =3D=3D ##\t ))=0A=0ACtrl + key sequences with=0A(( #key =3D=3D ##\C-u ))= =0A=0ABut how do I match against Alt + key sequences?=0A=0AThanks,=0AWendel= l=0A=0A=0A=0A________________________________=0AFrom: J=C3=A9r=C3=A9mie Roq= uet =0ATo: zsh-users@zsh.org=0ACc: nix@myproxylists.co= m=0ASent: Wed, March 9, 2011 6:35:48 AM=0ASubject: Re: ZSH's way to bind fu= nction to a key in a script?=0A=0A2011/3/9 :=0A> Can= 't get it working in a script. Tried both vt100/xterm terminals but nada.= =0A> My purpose is this:=0A>=0A> while [ : ] ; do=0A>=0A> ...=0A>=0A> A use= r press the space button and he will see the script progress ....=0A>=0A> d= one=0A=0AThen it's unrelated to bindkey ;-)=0A=0ATry this:=0A=0Awhile [ : ]= ; do=0A read -ks a=0A [[ $a =3D ' ' ]] && foo=0Adone=0A=0AHave a look= at =E2=80=9Cman zshbuiltins=E2=80=9D for more about the =E2=80=9Cread=E2= =80=9D builtin.=0A=0ABest regards,=0A=0A-- =0AJ=C3=A9r=C3=A9mie=0A=0A=0A=0A= --0-463104183-1299716558=:26531--