Skip to content

Commit

Permalink
tg-completion: fix extraction of available commands from output of help
Browse files Browse the repository at this point in the history
The completion script extracts the list of available tg
commands from the output of the help command. This wasn't working
(presumably because the output of 'tg help' has changed) and gets
fixed by this commit.
  • Loading branch information
ktetzlaff committed Aug 12, 2023
1 parent 6425af5 commit 212663a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/tg-completion.bash
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ __tg_commands ()
return
fi
local i IFS=" "$'\n'
for i in $(tg help | sed -n 's/^Usage:.*(\([^)]*\)).*/\1/p' | tr '|' ' ')
for i in $(tg help | sed -e '1,/^Available tg commands.*/d' -e 's,\[\|\],,g')
do
case $i in
*--*) : helper pattern;;
Expand Down

0 comments on commit 212663a

Please sign in to comment.