Fix bash completion.

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
This commit is contained in:
mb300sd 2020-05-10 04:03:32 -04:00 committed by Christian Decker
parent 97e3d61748
commit b6285ffa5d

View file

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