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" ) )