Skip to content

Commit 4bbd2a3

Browse files
committed
'main': Prepare to add additional fields to $precommand_options values.
No functional change.
1 parent 241d3a9 commit 4bbd2a3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

highlighters/main/main-highlighter.zsh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,8 +790,11 @@ _zsh_highlight_main_highlighter_highlight_list()
790790
elif ! (( in_redirection)) && [[ $this_word == *':start:'* ]]; then # $arg is the command word
791791
if (( ${+precommand_options[$arg]} )) && _zsh_highlight_main__is_runnable $arg; then
792792
style=precommand
793-
flags_with_argument=${precommand_options[$arg]%:*}
794-
flags_sans_argument=${precommand_options[$arg]#*:}
793+
() {
794+
set -- "${(@s.:.)precommand_options[$arg]}"
795+
flags_with_argument=$1
796+
flags_sans_argument=$2
797+
}
795798
next_word=${next_word//:regular:/}
796799
next_word+=':sudo_opt:'
797800
next_word+=':start:'

0 commit comments

Comments
 (0)