Make is_first_word_prefix regex a global var if bash-abbr is sourced in a function
This commit is contained in:
parent
855772503a
commit
f6c4e87af2
1 changed files with 1 additions and 1 deletions
|
|
@ -179,7 +179,7 @@ _redir_or_assign_word () {
|
||||||
# shellcheck disable=SC2155
|
# shellcheck disable=SC2155
|
||||||
declare _redir_or_assign_word="$(_redir_or_assign_word)" # TODO use bash 5.3 `${}` command substitution syntax to avoid subshells
|
declare _redir_or_assign_word="$(_redir_or_assign_word)" # TODO use bash 5.3 `${}` command substitution syntax to avoid subshells
|
||||||
|
|
||||||
declare -r is_first_word_prefix="($_control_op)[[:blank:]]*((($_redir_or_assign_word)[[:blank:]])*)"
|
declare -gr is_first_word_prefix="($_control_op)[[:blank:]]*((($_redir_or_assign_word)[[:blank:]]+)*)"
|
||||||
# If the regex leads to problems/performance issues, you may try this simpler regex
|
# If the regex leads to problems/performance issues, you may try this simpler regex
|
||||||
# that does no redirection/assignment word checking:
|
# that does no redirection/assignment word checking:
|
||||||
# declare -r is_first_word_prefix="($_control_op)[[:blank:]]*"
|
# declare -r is_first_word_prefix="($_control_op)[[:blank:]]*"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue