mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-01-30 09:47:13 +08:00
*: Remove trailing whitespace
This commit is contained in:
parent
caa749d030
commit
5d1d416dbf
@ -12,4 +12,3 @@ indent_style = space
|
||||
tab_width = 8
|
||||
indent_size = 8
|
||||
indent_style = tab
|
||||
|
||||
|
@ -96,4 +96,3 @@ IRC channel
|
||||
-----------
|
||||
|
||||
We're on #zsh-syntax-highlighting on Libera.Chat.
|
||||
|
||||
|
@ -91,7 +91,6 @@ to issue #418.
|
||||
|
||||
[zshcompsys-Standard-Styles]: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Standard-Styles
|
||||
[zshcompsys-Standard-Styles-format]: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#index-format_002c-completion-style
|
||||
|
||||
|
||||
|
||||
## Other changes:
|
||||
@ -881,4 +880,3 @@ in this area.
|
||||
# Version 0.2.1
|
||||
|
||||
(Start of changelog.)
|
||||
|
||||
|
@ -115,7 +115,7 @@ To create your own `acme` highlighter:
|
||||
|
||||
* Name your own functions and global variables `_zsh_highlight_acme_*`.
|
||||
|
||||
- In zsh-syntax-highlighting 0.4.0 and earlier, the entrypoints
|
||||
- In zsh-syntax-highlighting 0.4.0 and earlier, the entrypoints
|
||||
`_zsh_highlight_highlighter_acme_predicate` and
|
||||
`_zsh_highlight_highlighter_acme_paint`
|
||||
were named
|
||||
|
@ -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" # ~
|
||||
)
|
||||
|
||||
|
@ -20,11 +20,11 @@ that is, `$i` and `$j` specify a range, 1-indexed, inclusive of both endpoints.
|
||||
If `$todo` exists, the test point is marked as TODO (the failure of that test
|
||||
point will not fail the test), and `$todo` is used as the explanation.
|
||||
|
||||
2.
|
||||
2.
|
||||
If a test sets `$skip_test` to a non-empty string, the test will be skipped
|
||||
with the provided string as the reason.
|
||||
|
||||
3.
|
||||
3.
|
||||
If a test sets `$fail_test` to a non-empty string, the test will be skipped
|
||||
with the provided string as the reason.
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
type perl sponge >/dev/null || { print -ru2 -- "$0: This script requires perl(1) and sponge(1) [from moreutils]"; exit 1; }
|
||||
|
||||
local editor=( "${(@Q)${(z)${VISUAL:-${EDITOR:-vi}}}}" )
|
||||
() {
|
||||
() {
|
||||
> "$2" perl -nE '$highlighter = $1 if /^Running test (\S*)/; say "highlighters/${highlighter}/test-data/$1.zsh" if /^## (\S*)/' "$1"
|
||||
>>"$2" echo ""
|
||||
>>"$2" cat <"$1"
|
||||
|
@ -87,7 +87,7 @@ print 'expected_region_highlight=('
|
||||
local i
|
||||
local PREBUFFER
|
||||
local BUFFER
|
||||
|
||||
|
||||
PREBUFFER=""
|
||||
BUFFER="$buffer"
|
||||
region_highlight=()
|
||||
|
@ -408,7 +408,7 @@ _zsh_highlight_call_widget()
|
||||
# We use the new codepath under two conditions:
|
||||
#
|
||||
# 1. If it's available, which we check by testing for add-zle-hook-widget's availability.
|
||||
#
|
||||
#
|
||||
# 2. If zsh has the memo= feature, which is required for interoperability reasons.
|
||||
# See issues #579 and #735, and the issues referenced from them.
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user