mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
Fix bash completion
This commit is contained in:
@@ -31,7 +31,7 @@ _lightning_cli() {
|
|||||||
|
|
||||||
# get the regular commands
|
# get the regular commands
|
||||||
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
|
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
|
fi
|
||||||
|
|
||||||
COMPREPLY=( $( compgen -W "$helpopts $globalcmds" -X "*," -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$helpopts $globalcmds" -X "*," -- "$cur" ) )
|
||||||
|
|||||||
Reference in New Issue
Block a user