[Intel-gfx] [maintainer-tools PATCH 2/6] dim: columnize usage output if column(1) is available
Jani Nikula
jani.nikula at intel.com
Tue Oct 11 08:47:28 UTC 2016
The usage has become a bit unwieldy with the command list.
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
dim | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dim b/dim
index 5b105743cd65..79245550b6b2 100755
--- a/dim
+++ b/dim
@@ -1241,7 +1241,11 @@ function dim_usage
echo "usage: $dim [OPTIONS] SUBCOMMAND [ARGUMENTS]"
echo
echo "The available subcommands are:"
- dim_list_commands | sed 's/^/\t/'
+ if hash column 2>/dev/null; then
+ dim_list_commands | column -c 72 | sed 's/^/\t/'
+ else
+ dim_list_commands | sed 's/^/\t/'
+ fi
echo
echo "See '$dim help' for more information."
}
--
2.1.4
More information about the Intel-gfx
mailing list