From ab78875746103a2add4394abf82fd6d98fec72fa Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Tue, 6 Oct 2026 13:03:12 +0200 Subject: [PATCH] Fix failglob aborts in complete_alias `unset sta[-1]` is an unquoted glob pattern in __compal__split_cmd_line, so with `shopt -s failglob` it aborts the completion whenever a split string closes quotes, parentheses, braces, or backticks Quote the five occurrences like the earlier `unset` fix --- .config/bash/complete_alias | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.config/bash/complete_alias b/.config/bash/complete_alias index f70c08d..af5fb9e 100644 --- a/.config/bash/complete_alias +++ b/.config/bash/complete_alias @@ -375,7 +375,7 @@ __compal__split_cmd_line() { fi elif [[ "${sta[-1]}" == ')' ]]; then if [[ ')' == "${str:j:1}" ]]; then - unset sta[-1] + unset 'sta[-1]' elif [[ '$(' == "${str:j:2}" ]]; then sta+=( ')' ) (( j++ )) @@ -394,7 +394,7 @@ __compal__split_cmd_line() { fi elif [[ "${sta[-1]}" == '}' ]]; then if [[ '}' == "${str:j:1}" ]]; then - unset sta[-1] + unset 'sta[-1]' elif [[ '$(' == "${str:j:2}" ]]; then sta+=( ')' ) (( j++ )) @@ -413,7 +413,7 @@ __compal__split_cmd_line() { fi elif [[ "${sta[-1]}" == '`' ]]; then if [[ '`' == "${str:j:1}" ]]; then - unset sta[-1] + unset 'sta[-1]' elif [[ '$(' == "${str:j:2}" ]]; then sta+=( ')' ) (( j++ )) @@ -430,11 +430,11 @@ __compal__split_cmd_line() { fi elif [[ "${sta[-1]}" == "'" ]]; then if [[ "'" == "${str:j:1}" ]]; then - unset sta[-1] + unset 'sta[-1]' fi elif [[ "${sta[-1]}" == '"' ]]; then if [[ '"' == "${str:j:1}" ]]; then - unset sta[-1] + unset 'sta[-1]' elif [[ '$(' == "${str:j:2}" ]]; then sta+=( ')' ) (( j++ ))