Compare commits
3 Commits
659376eeab
...
a6e8ca7cf6
| Author | SHA1 | Date |
|---|---|---|
|
|
a6e8ca7cf6 | |
|
|
1d85c69261 | |
|
|
d08d5ef7c5 |
|
|
@ -372,6 +372,7 @@ _zsh_highlight_highlighter_main_paint()
|
||||||
'grc' :se # grc - a "generic colouriser" (that's their spelling, not mine)
|
'grc' :se # grc - a "generic colouriser" (that's their spelling, not mine)
|
||||||
'cpulimit' elp:ivz # cpulimit 0.2
|
'cpulimit' elp:ivz # cpulimit 0.2
|
||||||
'ktrace' fgpt:aBCcdiT
|
'ktrace' fgpt:aBCcdiT
|
||||||
|
'caffeinate' tw:dimsu # as of macOS's caffeinate(8) dated November 9, 2012
|
||||||
)
|
)
|
||||||
# Commands that would need to skip one positional argument:
|
# Commands that would need to skip one positional argument:
|
||||||
# flock
|
# flock
|
||||||
|
|
@ -1815,8 +1816,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}.
|
# The $~1 syntax normally performs filename generation, but not when it's on the right-hand side of ${x:=y}.
|
||||||
setopt localoptions nonomatch
|
setopt localoptions nonomatch
|
||||||
unset REPLY
|
if [[ ${1[1]} == '~' ]]; then
|
||||||
: ${REPLY:=${(Q)${~1}}}
|
REPLY=${~${(Q)1}}
|
||||||
|
else
|
||||||
|
REPLY=${(Q)1}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,11 @@ mkdir mydir
|
||||||
touch mydir/path-tilde-named.test
|
touch mydir/path-tilde-named.test
|
||||||
hash -d D=mydir
|
hash -d D=mydir
|
||||||
|
|
||||||
BUFFER='ls ~D/path-tilde-named.test'
|
BUFFER='ls ~D/path-tilde-named.test ~"D"'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
"1 2 command" # ls
|
"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