zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: Unmetafy of getsparam()
Date: Tue, 21 Jul 2015 21:07:01 +0100	[thread overview]
Message-ID: <20150721210701.457212d9@ntlworld.com> (raw)
In-Reply-To: <150719011354.ZM18370@torch.brasslantern.com>

On Sun, 19 Jul 2015 01:13:54 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> Here's a patch that attempts to clean up [un]metafication of non-special
> parameter values used internally to the shell.  Well, some of them.

Seems to make sense.  You can commit it now.  (Oops...)

> I'm unsure what to do with:
> 
> - ENV in init.c -- for parsestr() is a tokenized string also metafied?

The intention must surely be yes: parsestr() operates on internal
strings way after the input stage, and indeed metafication occurs early
in that, as witness zleread() returns a metafied line back to input.c
(and so does shingetline() if ZLE is not in use), so it's already
metafied by the time it hits the input stack --- so the string to be
parsed needs to be metafied as it's put back on the input stack.

Whether all pathways are correct is another question.

> - untok_and_escape() in subst.c

I think this has internal (metafied) strings at both input and output.

> - spckword() in utils.c -- patcompile expects a metafied string?

Yes, it does: I think spckword() gets a metafied string: zle_tricky.c
isn't easily penestrable but that's because it's dealing with shell
internal string, which should be metafied.

> - all of hist.c is a mess with respect to handling of HISTFILE

Yes, Mikael and I had extreme fun with this together with heckles from
the crowd for added effect about our efforts to keep it consistent.
(No doping allegations, at least...)  Probably best left alone until
something else turns up.

> - getcvar() in math.c

That's supposed to be handling it already within the function.

> - savesession() in zftp.c

This is all internal state, isn't it?  So as long as it's consistent it
doesn't matter.

> - LISTPROMPT in complistmatches()

That turns ultimately into the fmt used in compprintfmt, I think.
This already seems to be prepared to handle metafied strings,
though again whether it does so consistently may well not have been
checked.

> - MENUSELECT, MENUSCROLL, MENUMODE, MENUPROMPT in domenuselect()

Look to me like they all go to places that have some sort of a metafied
feel about them.  I'm guessing something customisable like this is
likely to have had a fair amount of kanji or katakana thrown at it by
now.

pws


  reply	other threads:[~2015-07-21 20:12 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15 16:51 bracketed paste Yuri D'Elia
2015-07-15 17:33 ` Yuri D'Elia
2015-07-15 18:15   ` Mikael Magnusson
2015-07-15 18:43     ` Yuri D'Elia
2015-07-16  5:19 ` Oliver Kiddle
2015-07-16 14:32   ` Yuri D'Elia
2015-07-18  2:33     ` Oliver Kiddle
2015-07-18 11:55       ` Yuri D'Elia
2015-07-18 17:17       ` Bart Schaefer
2015-07-18 23:28         ` Oliver Kiddle
2015-07-19  8:13           ` Unmetafy of getsparam() Bart Schaefer
2015-07-21 20:07             ` Peter Stephenson [this message]
2015-07-21 23:08               ` Bart Schaefer
2015-07-23  8:50             ` Peter Stephenson
2015-07-16 20:15   ` bracketed paste Bart Schaefer
2015-07-18 12:05     ` Yuri D'Elia
2015-07-18 18:08       ` Bart Schaefer
2015-07-19  2:50         ` PATCH: highlight pasted text Oliver Kiddle
2015-07-19  8:17           ` Bart Schaefer
2015-07-19 12:13           ` Yuri D'Elia
2015-07-19 17:12             ` Daniel Shahaf
2015-07-19 18:10               ` Bart Schaefer
2015-07-21 15:23                 ` Oliver Kiddle
2015-07-21 17:35                   ` Bart Schaefer
2015-07-23  3:57                     ` Oliver Kiddle
2015-07-19 17:57             ` Oliver Kiddle
2015-07-19 18:09               ` Yuri D'Elia
2015-08-08 21:51               ` Daniel Shahaf
2015-08-14  1:38                 ` Oliver Kiddle
2015-08-14  5:28                   ` Bart Schaefer
2015-07-23  5:00           ` Mikael Magnusson
2015-07-23  6:23             ` Oliver Kiddle
2015-07-24  5:06               ` Bart Schaefer
2015-07-24  5:21                 ` Bart Schaefer
2015-07-24 22:22                   ` Oliver Kiddle
2015-07-24 23:13                     ` Bart Schaefer
2015-07-25  7:49                       ` Oliver Kiddle
2015-07-25 16:46                         ` zle options (was Re: PATCH: highlight pasted text) Bart Schaefer
2015-07-28  9:09                           ` Oliver Kiddle
2015-07-24 19:06                 ` Vim special marks - Re: PATCH: highlight pasted text Oliver Kiddle
2015-07-24 19:45                   ` Bart Schaefer
2015-08-11 11:16                   ` Oliver Kiddle
2015-08-13 23:14             ` Daniel Shahaf
2015-08-13 23:50               ` Bart Schaefer
2015-08-14  2:09                 ` Oliver Kiddle
2015-08-14  5:24                   ` Bart Schaefer

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=20150721210701.457212d9@ntlworld.com \
    --to=p.w.stephenson@ntlworld.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).