Browse Source

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 <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
7fd5808803
  1. 2
      contrib/lightning-cli.bash-completion

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

Loading…
Cancel
Save