From feb468b517e1393a46eec020a07ab81d739b2a2b Mon Sep 17 00:00:00 2001 From: BF <38326544+convergedtarkus@users.noreply.github.com> Date: Wed, 25 Jan 2023 17:56:14 -0600 Subject: [PATCH] bug: Use C style strings when checking for invalid alias characters (#2188) * Use C style strings when checking for invalid alias characters Before, the '\n' would be interpreted as 'n' meaning that any alias who's command contained the letter 'n' would incorrect be skipped. * No need to escape characters in this context Escaping was just adding \ to the list multiple times Co-authored-by: David Farrell --- completion/available/aliases.completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completion/available/aliases.completion.bash b/completion/available/aliases.completion.bash index f9cc1ed1..3e45e960 100644 --- a/completion/available/aliases.completion.bash +++ b/completion/available/aliases.completion.bash @@ -50,7 +50,7 @@ function _bash-it-component-completion-callback-on-init-aliases() { fi # skip aliases to pipes, boolean control structures and other command lists - chars='\|\&\;\)\(\n\<\>' + chars=$'|&;()<>\n' if [[ "${alias_defn}" =~ [$chars] ]]; then continue fi