Przeglądaj źródła

'main': Do not expand special parameters. Fixes #489.

Adding «(e)» to the first subscript is a no-op: the subscript is known
to be safe due to the previous line.
pull/493/head
Daniel Shahaf 6 lat temu
rodzic
commit
8046c33b54
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      highlighters/main/main-highlighter.zsh

+ 1
- 1
highlighters/main/main-highlighter.zsh Wyświetl plik

@ -493,7 +493,7 @@ _zsh_highlight_highlighter_main_paint()
local MATCH; integer MBEGIN MEND
if [[ $res == none ]] && (( ${+parameters} )) &&
[[ ${arg[1]} == \$ ]] && [[ ${arg:1} =~ ^([A-Za-z_][A-Za-z0-9_]*|[0-9]+)$ ]] &&
(( ${+parameters[${MATCH}]} ))
(( ${+parameters[(e)${MATCH}]} )) && [[ ${parameters[(e)$MATCH]} != *special* ]]
then
_zsh_highlight_main__type ${(P)MATCH}
res=$REPLY

Ładowanie…
Anuluj
Zapisz