zsh-workers
 help / color / mirror / code / Atom feed
* accept-line question
@ 2015-04-01  7:36 Dave Yost
  2015-04-01  8:20 ` Peter Stephenson
  2015-04-02 17:12 ` Dave Yost
  0 siblings, 2 replies; 5+ messages in thread
From: Dave Yost @ 2015-04-01  7:36 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

There must be something more I have to do besides “accept-line”. But what?

I type control-a after sourcing my script, and it doesn’t work as I expect.

0 Wed 0:29:51 yost DaveBook ~
238 Z% cat accept-line-test.zsh
function x1 {
  BUFFER="$1"
  zle -R
  zle accept-line
}

function x2 {
  x1 echo\ 1
  x2 echo\ 2
}

zle -N xxx

bindkey ^a xxx
0 Wed 0:29:58 yost DaveBook ~
239 Z% source accept-line-test.zsh
0 Wed 0:30:03 yost DaveBook ~
240 Z% echo 2
2
0 Wed 0:30:04 yost DaveBook ~
241 Z% 

The output I want is

0 Wed 0:30:03 yost DaveBook ~
240 Z% echo 1
1
0 Wed 0:30:04 yost DaveBook ~
241 Z% echo 2
2
0 Wed 0:30:04 yost DaveBook ~
242 Z% 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-03 17:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-01  7:36 accept-line question Dave Yost
2015-04-01  8:20 ` Peter Stephenson
2015-04-02 17:12 ` Dave Yost
2015-04-03 16:09   ` Bart Schaefer
2015-04-03 17:03     ` Bart Schaefer

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).