Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] sh/ksh init: don't initialise lowercase parameters



I was going to apply the patch but I have two questions:

Martijn Dekker wrote on Tue, 28 Jan 2020 16:19 +0100:
> +++ b/Doc/Zsh/params.yo
> @@ -1173,8 +1173,8 @@ tt(histchars) to characters with a locale-dependent meaning will be
>  rejected with an error message.
>  )
>  vindex(HISTCHARS)
> -item(tt(HISTCHARS) <S> <Z>)(
> -Same as tt(histchars).  (Deprecated.)
> +item(tt(HISTCHARS) <S>)(
> +Same as tt(histchars).

Suggest to add ", but available in emulation modes too", otherwise
people will wonder whether the <Z> was omitted here by mistake.  I can
do that before applying the patch.

I intend to apply it to 5.9 unless there'll be another 5.8 test release
first.

> +++ b/Src/params.c
> @@ -309,7 +309,7 @@ IPDEF1("TTYIDLE", ttyidle_gsu, PM_READONLY_SPECIAL),
>  #define IPDEF2(A,B,C) {{NULL,A,PM_SCALAR|PM_SPECIAL|C},BR(NULL),GSU(B),0,0,NULL,NULL,NULL,0}
>  IPDEF2("USERNAME", username_gsu, PM_DONTIMPORT|PM_RESTRICTED),
>  IPDEF2("-", dash_gsu, PM_READONLY_SPECIAL),
> -IPDEF2("histchars", histchars_gsu, PM_DONTIMPORT),
> +IPDEF2("HISTCHARS", histchars_gsu, PM_DONTIMPORT),
>  IPDEF2("HOME", home_gsu, PM_UNSET),
>  IPDEF2("TERM", term_gsu, PM_UNSET),
>  IPDEF2("TERMINFO", terminfo_gsu, PM_UNSET),
> @@ -413,7 +413,7 @@ IPDEF8("MODULE_PATH", &module_path, "module_path", PM_DONTIMPORT|PM_RESTRICTED|P
>  
>  /* All of these have sh compatible equivalents.                */
>  IPDEF1("ARGC", argc_gsu, PM_READONLY_SPECIAL),
> -IPDEF2("HISTCHARS", histchars_gsu, PM_DONTIMPORT),
> +IPDEF2("histchars", histchars_gsu, PM_DONTIMPORT),
>  IPDEF4("status", &lastval),
>  IPDEF7("prompt", &prompt),
>  IPDEF7("PROMPT", &prompt),

What's the purpose of these two hunks?  They don't seem to have any build-time nor run-time effect?

Sorry for not spotting these two points earlier.

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author