From 855772503ad017b7de2107da4d74b005f3afbb17 Mon Sep 17 00:00:00 2001 From: tsi Date: Sat, 3 Jan 2026 01:24:46 +0100 Subject: [PATCH] Unset _redir_or_assign_word --- bash-abbr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bash-abbr b/bash-abbr index 3c859cb..1056501 100644 --- a/bash-abbr +++ b/bash-abbr @@ -177,14 +177,14 @@ _redir_or_assign_word () { unset -f _redir_or_assign_word } # shellcheck disable=SC2155 -declare -r _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:]])*)" # If the regex leads to problems/performance issues, you may try this simpler regex # that does no redirection/assignment word checking: # declare -r is_first_word_prefix="($_control_op)[[:blank:]]*" -unset -v _control_op +unset -v _control_op _redir_or_assign_word _try_abbrev_internal () { # Recursively perform abbrevation on the line defined by $1, taking $2 as the point and $3 as the mark.