Skip to content

Commit

Permalink
[eclair-cli] Use multiplatform escape sequence
Browse files Browse the repository at this point in the history
Also added cli `findroutebetweennodes` to the commands list.

Fixes #1206
  • Loading branch information
tompro committed Feb 22, 2021
1 parent d9c0b86 commit 5163749
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contrib/eclair-cli.bash-completion
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ _eclair-cli()
*)
# works fine, but is too slow at the moment.
# allopts=$($eclaircli help 2>&1 | awk '$1 ~ /^"/ { sub(/,/, ""); print $1}' | sed 's/[":]//g')
allopts="getinfo connect open close forceclose updaterelayfee peers channels channel allnodes allchannels allupdates findroute findroutetonode parseinvoice payinvoice sendtonode getsentinfo createinvoice getinvoice listinvoices listpendinginvoices getreceivedinfo audit networkfees channelstats"
allopts="getinfo connect open close forceclose updaterelayfee peers channels channel allnodes allchannels allupdates findroute findroutetonode findroutebetweennodes parseinvoice payinvoice sendtonode getsentinfo createinvoice getinvoice listinvoices listpendinginvoices getreceivedinfo audit networkfees channelstats"

if ! [[ " $allopts " =~ " $prev " ]]; then # prevent double arguments
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
Expand Down
3 changes: 2 additions & 1 deletion eclair-core/eclair-cli
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on <$api_url>.
Usage
-----
\e[93meclair-cli\e[39m [\e[93mOPTIONS\e[39m]... <\e[93mCOMMAND\e[39m> [--command-param=command-value]...
\x1b[93meclair-cli\x1b[39m [\x1b[93mOPTIONS\x1b[39m]... <\x1b[93mCOMMAND\x1b[39m> [--command-param=command-value]...
where OPTIONS can be:
-p <password> API's password
Expand Down Expand Up @@ -51,6 +51,7 @@ and COMMAND is one of the available commands:
=== Path-finding ===
- findroute
- findroutetonode
- findroutebetweennodes
- networkstats
=== Invoice ===
Expand Down

0 comments on commit 5163749

Please sign in to comment.