Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Clearing command line after some time?
- X-seq: zsh-users 9733
- From: Anssi Saari <as@xxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Clearing command line after some time?
- Date: Fri, 2 Dec 2005 11:43:41 +0200
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
I have this nasty habit of sometimes typing something on the command
line and then forgetting about it, due to interruptions. Usually it's
no problem, but if I happened to type in be rm, well, annoying things
can happen. (And no, I'm not looking for a discussion about aliasing rm).
Anyway, I figured that zsh can save me from this sort of thing and came
up with
trap '[[ $TTYIDLE -gt 60 ]] && [[ $#BUFFER -gt 0 ]] && zle kill-buffer && zle -I' ALRM
TMOUT=5
as a first draft. It seems to work, but I'd really like to insert the
stuff from the command line to command history instead of the kill
buffer. But I couldn't figure out how to do that?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author