From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9161 invoked by alias); 9 Mar 2011 14:32:16 -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: 15851 Received: (qmail 10410 invoked from network); 9 Mar 2011 14:32:04 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.215.171 as permitted sender) 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= MIME-Version: 1.0 In-Reply-To: References: From: =?UTF-8?B?SsOpcsOpbWllIFJvcXVldA==?= Date: Wed, 9 Mar 2011 15:01:05 +0100 Message-ID: Subject: Re: ZSH's way to bind function to a key in a script? To: zsh-users@zsh.org Cc: nix@myproxylists.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, 2011/3/9 : > 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, --=20 J=C3=A9r=C3=A9mie