Skip to content

Commit d561c72

Browse files
pyln-client: use | as line separator in lightning-cli help
Changelog-Changed: Replaced \n with | as the line separator in the plugin to enhance the readability of lightning-cli help. Signed-off-by: Nishant Bansal <[email protected]>
1 parent f05f499 commit d561c72

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+', ' | ', doc)
89+
args.append(" | %s" % doc)
8890

8991
return " ".join(args)
9092

0 commit comments

Comments
 (0)