Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
accept-line question
- X-seq: zsh-workers 34829
- From: Dave Yost <Dave@xxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: accept-line question
- Date: Wed, 1 Apr 2015 00:36:32 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:content-type:subject:date:message-id:to:mime-version :sendlaterdate; bh=+f6VCTBp+iQb6L9890GlvL6TCwu9VYU0Ceo9hgnCdrs=; b=U8aqYWkcu6Uxowb7KJElJTLRItefdzUSroyYq1gHnewj9QqpnO8TqzOjnqRu6hrL9/ HqW+z6YgJblEObs9PMYxTyvQ/0AnDGxB3HPy7kUxh/6Qyq3l4VwftO1uqDqG5/WLIj9b MWJFKC18MqWWx95+MmKx6NSS7wOXPDDejKiPzdurMq+Lgbc81AYCvgRtQdIfj8JwDymB r2TM7y6i0WLomq8OEEjK1a4YJRXND4l2wLAMmbk+WJDX1gbx5jueHHR7j+zUICgg6iPx LOIL5ZxHdDyMajDsaPKPpq6dXlLjzyyd3jATmbbDxh3EFJCJJ0LdYaE7fq0cRqRW2jAK ZXRw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Sender: Dave Yost <daveyostcom@xxxxxxxxx>
- Sendlaterdate: Wed, 1 Apr 2015 00:36:32 -0700
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