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

Re: path PATH




On 2023-01-30 06:56, Roman Perepelitsa wrote:

This is a different representation for the same information. You could
argue that this representation is better because it is easier to parse
for a human, or easier to understand correctly, or more difficult to
understand incorrectly. You cannot say that it's more correct though.
Yeah, that's true.  I shouldn't say 'wrong', it's more like 'misleading'.  I myself think the '-H' should remain.
You can expand a hideval parameter like any other.
     % typeset -H foo=bar
     % print -r -- $foo
     bar

Ha!  I tried everything but the simplest thing.  But that begs the question of what 'hideval' really achieves if in fact it's not hidden at all.


1 /aWorking/Zsh/Source/Wk 0 $ typeset +H bg

1 /aWorking/Zsh/Source/Wk 0 $ typeset -p bg
typeset -A bg=( [black]=$'\C-[[40m' [blue]=$'\C-[[44m' [cyan]=$'\C-[[46m' [default]=$'\C-[[49m' [green]=$'\C-[[42m' [grey]=$'\C-[[40m' [magenta]=$'\C-[[45m' [red]=$'\C-[[41m' [white]=$'\C-[[47m' [yellow]=$'\C-[[43m' )

1 /aWorking/Zsh/Source/Wk 0 $ print -r $bg
[ colored block characters here]

1 /aWorking/Zsh/Source/Wk 0 $ print -r ${(b)bg}
[46m [47m [43m [45m [40m [44m [41m [49m [42m [40m

1 /aWorking/Zsh/Source/Wk 0 $ print -r ${(q+)bg}
$'\C-[[46m' $'\C-[[47m' $'\C-[[43m' $'\C-[[45m' $'\C-[[40m' $'\C-[[44m' $'\C-[[41m' $'\C-[[49m' $'\C-[[42m' $'\C-[[40m'


... looks like I must still 'typeset +H' to see the real value -- keys and values that is.

IMHO the whole thing is a mess.






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