From 7d94e92a70e1e4fa71fd54882db4795c58cb5716 Mon Sep 17 00:00:00 2001 From: Alejandro R Mosteo Date: Wed, 24 Feb 2021 15:39:21 +0100 Subject: [PATCH] Fix bash completion after help formatting changes (#694) --- scripts/alr-completion.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/alr-completion.bash b/scripts/alr-completion.bash index 5bc9cb6b..9ed8633c 100755 --- a/scripts/alr-completion.bash +++ b/scripts/alr-completion.bash @@ -5,8 +5,8 @@ if ! builtin type -P alr &>/dev/null; then return fi -# Commands -_alr_commands=$(alr | sed -n '/Valid commands:/,/Help topics:/p' | tail -n +3 | head -n -2 | awk '{ print $1 }' | xargs) +# Commands/Topics: all line-first words not starting with capital letter, after # COMMANDS +_alr_commands=$(alr | grep COMMANDS -A 99 | awk '{print $1}' | grep -v '[[:upper:]]' | xargs) # Long global switches _alr_global_switches=$(alr -h | grep -Eo -- '--[[:alnum:]-]+' | xargs) -- 2.39.5