mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
*: Remove trailing whitespace
This commit is contained in:
parent
caa749d030
commit
5d1d416dbf
13 changed files with 17 additions and 22 deletions
|
|
@ -95,7 +95,7 @@ _zsh_highlight_highlighter_brackets_paint()
|
|||
fi
|
||||
}
|
||||
|
||||
# Helper function to differentiate type
|
||||
# Helper function to differentiate type
|
||||
_zsh_highlight_brackets_match()
|
||||
{
|
||||
case $BUFFER[$1] in
|
||||
|
|
|
|||
|
|
@ -42,6 +42,6 @@ _zsh_highlight_highlighter_cursor_predicate()
|
|||
_zsh_highlight_highlighter_cursor_paint()
|
||||
{
|
||||
[[ $WIDGET == zle-line-finish ]] && return
|
||||
|
||||
|
||||
_zsh_highlight_add_highlight $CURSOR $(( $CURSOR + 1 )) cursor
|
||||
}
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ _zsh_highlight_highlighter_main_paint()
|
|||
}
|
||||
|
||||
# Try to expand $1, if it's possible to do so safely.
|
||||
#
|
||||
#
|
||||
# Uses two parameters from the caller: $parameter_name_pattern and $res.
|
||||
#
|
||||
# If expansion was done, set $reply to the expansion and return true.
|
||||
|
|
@ -458,7 +458,7 @@ _zsh_highlight_main_highlighter__try_expand_parameter()
|
|||
else
|
||||
parameter_name=${arg:1}
|
||||
fi
|
||||
if [[ $res == none ]] &&
|
||||
if [[ $res == none ]] &&
|
||||
[[ ${parameter_name} =~ ^${~parameter_name_pattern}$ ]] &&
|
||||
[[ ${(tP)MATCH} != *special* ]]
|
||||
then
|
||||
|
|
@ -781,7 +781,7 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||
if (( ! in_redirection )); then
|
||||
if [[ $this_word == *':sudo_opt:'* ]]; then
|
||||
if [[ -n $flags_with_argument ]] &&
|
||||
{
|
||||
{
|
||||
# Trenary
|
||||
if [[ -n $flags_sans_argument ]]
|
||||
then [[ $arg == '-'[$flags_sans_argument]#[$flags_with_argument] ]]
|
||||
|
|
@ -809,7 +809,7 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||
this_word=':sudo_opt:'
|
||||
next_word+=':start:'
|
||||
next_word+=':sudo_opt:'
|
||||
elif [[ -n $flags_solo ]] &&
|
||||
elif [[ -n $flags_solo ]] &&
|
||||
{
|
||||
# Trenary
|
||||
if [[ -n $flags_sans_argument ]]
|
||||
|
|
@ -867,7 +867,7 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||
elif [[ $this_word == *':start:'* ]] && [[ $arg == $'\n' ]]; then
|
||||
style=commandseparator
|
||||
elif [[ $this_word == *':start:'* ]] && [[ $arg == ';' ]] && (( $#in_alias )); then
|
||||
style=commandseparator
|
||||
style=commandseparator
|
||||
else
|
||||
# Empty commands (semicolon follows nothing) are valid syntax.
|
||||
# However, in interactive use they are likely to be erroneous;
|
||||
|
|
@ -876,7 +876,7 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||
# Alias definitions are exempted from this check to allow multiline aliases
|
||||
# with explicit (redundant) semicolons: «alias foo=$'bar;\nbaz'» (issue #677).
|
||||
#
|
||||
# See also #691 about possibly changing the style used here.
|
||||
# See also #691 about possibly changing the style used here.
|
||||
style=unknown-token
|
||||
fi
|
||||
|
||||
|
|
@ -1031,7 +1031,7 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||
else
|
||||
# assignment to a scalar parameter.
|
||||
# (For array assignments, the command doesn't start until the ")" token.)
|
||||
#
|
||||
#
|
||||
# Discard :start_of_pipeline:, if present, as '!' is not valid
|
||||
# after assignments.
|
||||
next_word+=':start:'
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ else
|
|||
touch kappa.exe
|
||||
chmod +x kappa.exe
|
||||
cd kappa
|
||||
|
||||
|
||||
BUFFER='$PWD.exe; ${PWD}.exe'
|
||||
|
||||
|
||||
expected_region_highlight=(
|
||||
"1 8 unknown-token" # $PWD.exe - not eval'd; issue #328
|
||||
"9 9 commandseparator" # ;
|
||||
|
|
|
|||
|
|
@ -34,4 +34,3 @@ expected_region_highlight=(
|
|||
"1 2 command" # ls
|
||||
"4 4 default" # ~
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue