Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eclair-cli usage example color formatting not working in different shells #1206

Closed
fjahr opened this issue Nov 11, 2019 · 0 comments
Closed

Comments

@fjahr
Copy link

fjahr commented Nov 11, 2019

I have been using the default version (old) of Bash in the latest macOS version and the color formatting in the usage example was not working as intended. I checked and the \e is not supported in the version that ships with macOS currently. However, I switched to zsh (5.7.1) and it was the same case there. Then upgraded Bash via homebrew (5.0.11) and I am still seeing the issue. I have been trying the See example usage line:

$ eclair-core/eclair-cli
==============================
Command line client for eclair
==============================

This tool requires the eclair node's API to be enabled and listening
on <http://localhost:8080>.

Usage
-----
\e[93meclair-cli\e[39m [\e[93mOPTIONS\e[39m]... <\e[93mCOMMAND\e[39m> [--command-param=command-value]...

where OPTIONS can be:
  -p <password>         API's password
  -a <address>          Override the API URL with <address>
  -h                    Show this help
  -s                    Some commands can print a trimmed JSON

and COMMAND is one of:
  getinfo, connect, disconnect, open, close, forceclose, updaterelayfee,
  peers, channels, channel, allnodes, allchannels, allupdates
  findroute, findroutetonode, parseinvoice, payinvoice, sendtonode,
  sendtoroute, getsentinfo, createinvoice, getinvoice, listinvoices,
  listpendinginvoices, getreceivedinfo, audit, networkfees,
  channelstats, usablebalances

Examples
--------
  eclair-cli -a localhost:1234 peers        list the peers of a node hosted on localhost:1234
  eclair-cli close --channelId=006fb...     closes the channel with id 006fb...


Full documentation here: <https://acinq.github.io/eclair>

Using the color formatting in printf it comes out correctly, so there seems to be some kind of escaping issue?

$ printf '\e[93meclair-cli\e[39m [\e[93mOPTIONS\e[39m]... <\e[93mCOMMAND\e[39m> [--command-param=command-value]'
eclair-cli [OPTIONS]... <COMMAND> [--command-param=command-value]
tompro added a commit to tompro/eclair that referenced this issue Feb 21, 2021
@t-bast t-bast closed this as completed in 5163749 Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants