From 7fd5808803a5466846614e69a5cf5ee7e3781657 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 29 Jan 2018 11:00:15 +1030 Subject: [PATCH] contrib/lightning-cli.bash-completion: fix for new simpler help format. Plus, we don't need awk *and* sed for this! Signed-off-by: Rusty Russell --- contrib/lightning-cli.bash-completion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/lightning-cli.bash-completion b/contrib/lightning-cli.bash-completion index 038b7e7db..a6fa6503d 100644 --- a/contrib/lightning-cli.bash-completion +++ b/contrib/lightning-cli.bash-completion @@ -31,7 +31,7 @@ _lightning_cli() { # get the regular commands if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then - helpopts=$($lightning_cli help 2>/dev/null | awk '{print $4}' | sed 's@[,"]@@g') + helpopts=$($lightning_cli -H help 2>/dev/null | sed -n 's/^command=//p') fi COMPREPLY=( $( compgen -W "$helpopts $globalcmds" -X "*," -- "$cur" ) )