From: "Jérémie Roquet" <arkanosis@gmail.com>
To: zsh-users@zsh.org
Cc: nix@myproxylists.com
Subject: Re: ZSH's way to bind function to a key in a script?
Date: Wed, 9 Mar 2011 15:01:05 +0100 [thread overview]
Message-ID: <AANLkTikuzpSBtnCS0fWxQFDerbPX=pMqnR2JS15QTr25@mail.gmail.com> (raw)
In-Reply-To: <dc64f3246d1cac04e3dfa582a9e1ad16.squirrel@gameframe.net>
Hi,
2011/3/9 <nix@myproxylists.com>:
> 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
next prev parent reply other threads:[~2011-03-09 14:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-09 13:46 nix
2011-03-09 14:01 ` Jérémie Roquet [this message]
2011-03-09 14:05 ` Jérémie Roquet
[not found] ` <34287570baba3024c8cffea8be3da248.squirrel@gameframe.net>
2011-03-09 14:35 ` Jérémie Roquet
2011-03-10 0:22 ` Wendell Hom
2011-03-09 14:11 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTikuzpSBtnCS0fWxQFDerbPX=pMqnR2JS15QTr25@mail.gmail.com' \
--to=arkanosis@gmail.com \
--cc=nix@myproxylists.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).