Fix bash completion

This commit is contained in:
darosior 2019-05-18 00:14:33 +02:00 committed by Rusty Russell
parent 4370ffa978
commit 862ae87389

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/^command=//p')
helpopts=$($lightning_cli -H help 2>/dev/null | sed -n 's/^[a-z]/&/p' | sed '$ d')
fi
COMPREPLY=( $( compgen -W "$helpopts $globalcmds" -X "*," -- "$cur" ) )