From bf422cf9008eecc58d8b3b33c09c40e1ca4b20e2 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Thu, 18 May 2023 12:28:06 +0800 Subject: [PATCH] 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 ``` --- src/busctl/busctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.3