From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14572 invoked from network); 25 Mar 1997 23:10:17 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 25 Mar 1997 23:10:17 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id RAA03968; Tue, 25 Mar 1997 17:57:33 -0500 (EST) Resent-Date: Tue, 25 Mar 1997 17:55:56 -0500 (EST) From: Zefram Message-Id: <27475.199703241842@stone.dcs.warwick.ac.uk> Subject: Re: Can't use bindkey -c To: stephen.talley@Central.Sun.COM (Steve Talley) Date: Mon, 24 Mar 1997 18:42:09 +0000 (GMT) Cc: zsh-users@math.gatech.edu In-Reply-To: <199703221940.MAA01919@ipecac.Central.Sun.COM> from "Steve Talley" at Mar 22, 97 12:40:32 pm X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]9073.89 X-Phase: The Moon is Full X-US-Congress: Moronic fuckers X-Personality: INTJ Content-Type: text Resent-Message-ID: <"x8WHC3.0.bp.tV5Ep"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/757 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Steve Talley wrote: >Does zsh's "bindkey" allow the same functionality as tcsh's "bindkey >-c"? This allows a keystroke to be bound to a builtin or external >command instead of an editor command. This is useful when I'd like to >run a command and see it's output without having to destroy the >contents of the command-line buffer. Apart from the method that Peter has posted, if you have version 3.1.1 and have applied the patches that have been posted recently, the following can be done: bindkey "^P" run-pwd zle -N run-pwd function run-pwd { echo pwd zle redisplay } Presumably that patch will be in 3.1.2. In a later version, there will be a slightly more general solution, probably looking something like: zle -N run-command function run-command { zle trash-zle eval "$STACK" zle -s } bindkey -x "^P" run-command pwd -zefram