Skip to content

Commit

Permalink
Fix bash completion.
Browse files Browse the repository at this point in the history
At some point lightning-cli help defaulted to human readable format, the additional -H broke the bash completion.

Changelog-Fixed: bash completion on lightning-cli now works again
  • Loading branch information
mb300sd authored and cdecker committed May 15, 2020
1 parent 97e3d61 commit b6285ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/lightning-cli.bash-completion
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ _lightning_cli() {

# get the regular commands
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
helpopts=$($lightning_cli -H help 2>/dev/null | sed -n 's/^\([a-z][a-z_-]*\).*/\1/p' | sed '$ d')
helpopts=$($lightning_cli help 2>/dev/null | sed -n 's/^\([a-z][a-z_-]*\).*/\1/p' | sed '$ d')
fi

COMPREPLY=( $( compgen -W "$helpopts $globalcmds" -X "*," -- "$cur" ) )
Expand Down

0 comments on commit b6285ff

Please sign in to comment.