Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: quick bugfix for sticky-note
- X-seq: zsh-workers 47563
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: vapnik spaknik <vapniks@xxxxxxxxx>
- Subject: Re: quick bugfix for sticky-note
- Date: Sun, 15 Nov 2020 11:44:47 -0800
- Archived-at: <https://zsh.org/workers/47563>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-11/CAH%2Bw%3D7Zt%2B%3DTxrRk6VMCc%2Bew3XnZ1xdOsDX1a2jJ5EGMN6kMwZg%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-ot1-f48.google.com) smtp.remote-ip=209.85.210.48; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none
- Cc: Zsh Hackers List <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2QoflxOArYEe7SliDqb2YKTFfbEwh3p3j17sFf58TUI=; b=r/DdF9N3bnkpbLVSAuJMRFYwhV+qdvZJ49lGq8gAMa9IZS7K+yos0idqjDn2tQV4yI fGbsb+gKAyVXliOlfodOdwvUsdIBihzjKWd3YyqAzOj1bp97V0tOlxJrv+M3n/HYwKFn PQYODH4UlnDQFnPY+H9ETEcnB+GjH3/n4ddP31u/2Oc8zVPBeM8Q2fre0jjBf3yj/pF0 qXHDznNy6M5sj8n0qDF2bsDdXXq24cxHnfxZTNMNChT6oEZRCIzgEGjvvdEM+72rVeoe i3W01r4T+NgyauHYb8DZs4mnlcXm6mbqH7lCu6fMvkK+U4GeSjpKIIX8REQaM4qhev1f Or0w==
- In-reply-to: <1177177665.5499794.1605395141729@mail.yahoo.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- References: <1177177665.5499794.1605395141729.ref@mail.yahoo.com> <1177177665.5499794.1605395141729@mail.yahoo.com>
- Sender: zsh-workers-request@xxxxxxx
On Sat, Nov 14, 2020 at 3:06 PM vapnik spaknik <vapniks@xxxxxxxxx> wrote:
>
> The problem is that sticky-note resets all options which means that flowcontrol is enabled and so pressing ctrl+s overrides any keybindings and stops output. I can't see any reason for needing this behaviour, so a quick fix would be to just add 'noflowcontrol' to the 'setopt' line near the start of the function.
Hm. The problem with that is that people who want flow control
suddenly lose it.
The doc for "emulate" says:
If the -R switch is given, all settable options are reset to their
default value corresponding to the specified emulation mode, except
for certain options describing the interactive environment;
I wonder if flowcontrol should be considered an option "describing the
interactive environment" and therefore should not be reset by "emulate
-R". That would be a change to long-standing behavior, of course, but
is there an obvious case where it would really matter?
In the meantime, this (apologies for any gmail word-wrapping):
diff --git a/Functions/Misc/sticky-note b/Functions/Misc/sticky-note
index efe5ec1eb..dd31eb81f 100644
--- a/Functions/Misc/sticky-note
+++ b/Functions/Misc/sticky-note
@@ -48,7 +48,7 @@
# I encourage all you creative people to contribute enhancements ...
-emulate -LR zsh
+emulate -LR zsh -o ${${options[flowcontrol]/off/no}/on/}flowcontrol
setopt nobanghist extendedhistory histignoredups
local STICKYFILE=${STICKYFILE:-$HOME/.zsticky}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author