From: Matt Johnston Date: Thu, 18 May 2023 04:28:06 +0000 (+0800) Subject: busctl: Add space before "tree" paths for copying X-Git-Tag: v254-rc1~451 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf422cf9008eecc58d8b3b33c09c40e1ca4b20e2;p=thirdparty%2Fsystemd.git busctl: Add space before "tree" paths for copying This allows a double-click on the path in a terminal to select the whole path. Otherwise the leading '-' character is also included in the copied path. ``` New output: ./busctl tree org.freedesktop.network1 `- /org `- /org/freedesktop |- /org/freedesktop/LogControl1 `- /org/freedesktop/network1 |- /org/freedesktop/network1/link | |- /org/freedesktop/network1/link/_31 | |- /org/freedesktop/network1/link/_32 ``` --- diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c index 820d27da20d..965ded9675e 100644 --- a/src/busctl/busctl.c +++ b/src/busctl/busctl.c @@ -407,7 +407,7 @@ static void print_subtree(const char *prefix, const char *path, char **l) { n++; } - printf("%s%s%s\n", + printf("%s%s %s\n", prefix, special_glyph(has_more ? SPECIAL_GLYPH_TREE_BRANCH : SPECIAL_GLYPH_TREE_RIGHT), *l);