Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

accept-line question



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% 



Messages sorted by: Reverse Date, Date, Thread, Author