mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
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>
This commit is contained in:
parent
7d18ef9ecf
commit
7fd5808803
@ -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…
Reference in New Issue
Block a user