Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ZSH's way to bind function to a key in a script?
- X-seq: zsh-users 15852
- From: Jérémie Roquet <arkanosis@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: ZSH's way to bind function to a key in a script?
- Date: Wed, 9 Mar 2011 15:35:48 +0100
- Cc: nix@xxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=NsAslC4FEOj9UEBqG37nTKVdDHv2XVpyJcOJGhx/vMI=; b=fGlbHqstOaCrqZ9m+5giu4yLpcOUZ3iM8FmfGAOBaLFXYkzZOiyEeevZThuzbVwkdc kesRjTUwJ1sfvaVtRyRK36oT5Jag4kBqb5cSCTvAkdbK9L6JhQwUQ0nXIW2X3T4D5oAl 9rKk7QrUTN6irNNm4qbfa9kauuovOEE3j26/s=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=xlTSu/pN0PHFeBIeV/P0T8cEbAfPMxpw+VrWiC5wBS1Mr1oqOPVf8Sd/ISS86nm7xh 9qNHDba/qkX031mhnsUetAHil6RQUKgh3qLLLwRodonKyalwwLWNkkQps8qfJxIK7L5o qrk5KkT0E4FrtuNSJHsL/iFiDTitgAzDxcbbA=
- In-reply-to: <34287570baba3024c8cffea8be3da248.squirrel@gameframe.net>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <dc64f3246d1cac04e3dfa582a9e1ad16.squirrel@gameframe.net> <AANLkTikuzpSBtnCS0fWxQFDerbPX=pMqnR2JS15QTr25@mail.gmail.com> <34287570baba3024c8cffea8be3da248.squirrel@gameframe.net>
2011/3/9 <nix@xxxxxxxxxxxxxxxx>:
> Can't get it working in a script. Tried both vt100/xterm terminals but nada.
> My purpose is this:
>
> while [ : ] ; do
>
> ...
>
> A user press the space button and he will see the script progress ....
>
> done
Then it's unrelated to bindkey ;-)
Try this:
while [ : ]; do
read -ks a
[[ $a = ' ' ]] && foo
done
Have a look at “man zshbuiltins” for more about the “read” builtin.
Best regards,
--
Jérémie
Messages sorted by:
Reverse Date,
Date,
Thread,
Author