Compare commits
3 Commits
a6e8ca7cf6
...
39a8547c4c
| Author | SHA1 | Date |
|---|---|---|
|
|
39a8547c4c | |
|
|
c4d9559184 | |
|
|
d08d5ef7c5 |
|
|
@ -354,6 +354,7 @@ _zsh_highlight_highlighter_main_paint()
|
|||
'pkexec' '' # doesn't take short options; immune to #121 because it's usually not passed --option flags
|
||||
# Not listed: -h, which has two different meanings.
|
||||
'sudo' Cgprtu:AEHPSbilns:eKkVv # as of sudo 1.8.21p2
|
||||
'run0' ugD:h # systemd 256.6
|
||||
'stdbuf' ioe:
|
||||
'eatmydata' ''
|
||||
'catchsegv' ''
|
||||
|
|
@ -1816,8 +1817,11 @@ _zsh_highlight_main_highlighter_expand_path()
|
|||
|
||||
# The $~1 syntax normally performs filename generation, but not when it's on the right-hand side of ${x:=y}.
|
||||
setopt localoptions nonomatch
|
||||
unset REPLY
|
||||
: ${REPLY:=${(Q)${~1}}}
|
||||
if [[ ${1[1]} == '~' ]]; then
|
||||
REPLY=${~${(Q)1}}
|
||||
else
|
||||
REPLY=${(Q)1}
|
||||
fi
|
||||
}
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -31,9 +31,11 @@ mkdir mydir
|
|||
touch mydir/path-tilde-named.test
|
||||
hash -d D=mydir
|
||||
|
||||
BUFFER='ls ~D/path-tilde-named.test'
|
||||
BUFFER='ls ~D/path-tilde-named.test ~"D"'
|
||||
|
||||
expected_region_highlight=(
|
||||
"1 2 command" # ls
|
||||
"4 27 path" # ~D/path-tilde-named.test
|
||||
"4 27 path" # ~D/path-tilde-named.test
|
||||
"29 32 path" # ~"D"
|
||||
"30 32 double-quoted-argument" # "D"
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue