From 74cc7c2515b15d285700204d55388a3d7d8a2ca4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 19 Apr 2017 13:22:31 +0200 Subject: column: parent and child has to be independent Signed-off-by: Karel Zak --- text-utils/column.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'text-utils/column.c') diff --git a/text-utils/column.c b/text-utils/column.c index c22de90ce..707086244 100644 --- a/text-utils/column.c +++ b/text-utils/column.c @@ -329,7 +329,7 @@ static void create_tree(struct column_control *ctl) if (!parent) continue; - if (strcmp(id, parent) == 0) + if (strcmp(id, parent) == 0 && ln_i != ln) scols_line_add_child(ln_i, ln); } } @@ -556,7 +556,7 @@ static void __attribute__((__noreturn__)) usage(int rc) fputs(_(" -W, --table-wrap wrap text in the columns when necessary\n"), out); fputs(_(" -J, --json use JSON output format for table\n"), out); - fputs(USAGE_OPTIONS, out); + fputs(USAGE_SEPARATOR, out); fputs(_(" -r, --tree column to use tree-like output for the table\n"), out); fputs(_(" -i, --tree-id line ID to specify child-parent relation\n"), out); fputs(_(" -p, --tree-parent parent to specify child-parent relation\n"), out); -- cgit v1.2.3-55-g7522