Skip to content

Commit 4c958c1

Browse files
NishantBansal2003rustyrussell
authored andcommitted
pyln-client: use \n as line separator in lightning-cli help
Changelog-Changed: Interpret \n as the line separator in plugins to enhance the readability of lightning-cli help. Signed-off-by: Nishant Bansal <[email protected]> [ Modified to use \n not | --RR ]
1 parent c8dbf47 commit 4c958c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contrib/pyln-client/pyln/client/plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def get_usage(self):
8484
args.append("[%s]" % arg)
8585

8686
if self.description is not None:
87-
args.append("\n%s" % self.description)
87+
doc = inspect.getdoc(self.func)
88+
doc = re.sub('\n', '\n ', doc)
89+
args.append(" \n %s" % doc)
8890

8991
return " ".join(args)
9092

0 commit comments

Comments
 (0)