zsh-workers
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: "Andrew Reyes" <dsreyes1014@icloud.com>, zsh-workers@zsh.org
Subject: Re: Unset “zle_bracketed_paste” .zshrc
Date: Sat, 18 Jan 2020 19:40:42 +0000	[thread overview]
Message-ID: <cb836d6c-2149-49a8-8fda-afb7981eec7a@www.fastmail.com> (raw)
In-Reply-To: <0723EF0A-BD62-4C2C-AAA1-735AD3D64768@icloud.com>

Andrew Reyes wrote on Fri, 17 Jan 2020 23:20 +00:00:
> The problem is: 
> 1) zsh/zle's setup_() assigns the parameter, overwriting existing values
> 
> 2) not possible to 'unset' the parameter before zsh/zle is loaded.

@Andrew thanks for the report.  Let me spell out the symptoms for the list:

In zshrc, «typeset -a zle_bracketed_paste=('' '')» and «unset
zle_bracketed_paste» have no effect if done before zsh/zle has been
loaded, because of zsh/zle's setup_() unconditionally assigns to the
parameter, even if it already exists and has a non-null value.

I looked into this yesterday, and guarding the assignaparam() call with
a paramtab->getnode() != NULL fixes the case that the variable is
already set by the time zsh/zle is loaded (e.g., if it's set in zshrc).
However, I haven't been able to make «unset zle_bracketed_paste»  have
any lasting effect if done before zsh/zle is loaded.  Is that achievable?


  reply	other threads:[~2020-01-18 19:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17 23:20 Andrew Reyes
2020-01-18 19:40 ` Daniel Shahaf [this message]
2020-01-23  3:12   ` Daniel Shahaf
2020-01-23  9:53     ` Peter Stephenson
2020-01-26  0:45       ` Daniel Shahaf
2020-01-27 14:01         ` Peter Stephenson
2020-01-28 11:09           ` Peter Stephenson
2020-01-29 11:23             ` Peter Stephenson
2020-02-06 12:40               ` Daniel Shahaf
2020-02-06 13:32                 ` Mikael Magnusson
2020-02-06 14:09                   ` Peter Stephenson
2020-03-14  3:28                     ` Daniel Shahaf
2020-01-29  8:34           ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb836d6c-2149-49a8-8fda-afb7981eec7a@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=dsreyes1014@icloud.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).