Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Disabling prompt refresh
- X-seq: zsh-users 22462
- From: Jesper Nygårds <jesper.nygards@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Disabling prompt refresh
- Date: Mon, 13 Feb 2017 15:31:05 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=z5LNViCdqdR3ww6n0CxW/dELtnJ4zBUfWYt3KQQSGps=; b=iCT4K/MSz+Wm1sAZoGOQh2AH1u7qgWk29XS+4YNvCCGEPvO1LoA7e1eoR8zzmkng68 DKPUrpwpRRP12aasHAusWj4C6NoSFhl5d++pzJ5T4wo9XM4wc71io8ed9JP6/kaBg1d/ JJe2gEwaGWF1YeHmhes97aHKBO6KzHF+oqWx5K8BJFQJb3rBu8X+rSfEZrWrUgGs0JWy 4ybv/kYkTwXmmq2AaF9T+vd8oVLMDZQWVr+Wpw9kkTBJCMEH+w6+7WZNbEecL8/dFQwQ iTzqAJ7vOeU8hW2ySpGFbWv8KmaAgzbkWBGe3hdg2faP6a9XrIXC1Mj0BYfT5IyehdP/ HShA==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
I have the following function, written by Peter years ago, in my .zshrc:
schedprompt() {
emulate -L zsh
zmodload -i zsh/sched
integer i=${"${(@)zsh_scheduled_events#*:*:}"[(I)schedprompt]}
(( i )) && sched -$i
zle && zle reset-prompt
sched +30 schedprompt
}
It refreshes the prompt every 30 seconds, which is very nice.
I also have the following little widget, which displays the current dir
stack below the command line:
_show_dirs() {
zle -M "$(dirs -vl)"
}
However, the schedprompt-function makes the output from "zle -M" disappear,
so that sometimes when I have used the widget to display the dir stack, it
disappears because of the refresh.
Is there a way to either disable the prompt refresh while the message is
displayed, or, alternatively, to redisplay the message after a prompt
refresh?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author