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 15851
- 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:01:05 +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=DPQZx+63R5LZdrm7N1tLs4U6sqy8juS//dS96+kEoZ0=; b=ftdjJoFwjSQsdVrkwwfnPMUmvTaozVd5EZjlWXi3B5BniuM84s4nOs/zX8SdTGB8bm HZS7KqsjzBBxmXhL/OTcj2rxTqDiizN0JQAZBrlD/peUg0mx6qPizqZy9M4P6xIYtKlr oMVui7weKsSFBR0/ZmmN+M57oQihIGlknd+2c=
- 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=uc1eNPZFrQHOmrKEUr6u1Bvwt3UsBrhLP8tTyS+1gDsSdIczyv1Ukunv7Q7EUlsWkU idpvPOe98bOwldbOHvhhc4rS0tRW3HM9iY7rILOMgK2qoWr5BuXcRBP/xwTK6V/TkBCV LaNE8eJ5WGhG/qJ/Qv0l5C9w/UnfPvcpxoHKI=
- In-reply-to: <dc64f3246d1cac04e3dfa582a9e1ad16.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>
Hi,
2011/3/9 <nix@xxxxxxxxxxxxxxxx>:
> Hi everyone. I was reading last night about "bindkey" etc. , and i could
> not get it working.
>
> #!/bin/zsh
>
> function foo () {
>
> echo "Foo ooo"
> }
>
> In this script, how to bind function "foo" to a key. So lets say i press
> the Space button and it should trigger foo?
zle -N foo
bindkey ' ' foo
Best regards,
--
Jérémie
Messages sorted by:
Reverse Date,
Date,
Thread,
Author