From 0aed5208a06bcbfba1c3373dd8f395f1fef926a8 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 20 Jun 2022 21:05:14 +0200 Subject: T1748: vbash: beautify tab completion output/line breaks --- etc/bash_completion.d/vyatta-cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg index da75aa4..eb07616 100644 --- a/etc/bash_completion.d/vyatta-cfg +++ b/etc/bash_completion.d/vyatta-cfg @@ -463,11 +463,13 @@ get_help_text () fi fi if [ ${#_get_help_text_items[idx]} -lt $((6 - $node)) ]; then + vyatta_help_text+="${_get_help_text_items[idx]}\\t\\t\\t" + elif [ ${#_get_help_text_items[idx]} -lt $((14 - $node)) ]; then vyatta_help_text+="${_get_help_text_items[idx]}\\t\\t" - elif [ ${#_get_help_text_items[idx]} -lt 13 ]; then + elif [ ${#_get_help_text_items[idx]} -lt 21 ]; then vyatta_help_text+="${_get_help_text_items[idx]}\\t" else - vyatta_help_text+="${_get_help_text_items[idx]}\\n\\x20\\x20\\x20\\t\\t" + vyatta_help_text+="${_get_help_text_items[idx]}\\n\\x20\\x20\\x20\\t\\t\\t" fi vyatta_help_text+="${_get_help_text_helps[idx]}" done -- cgit v1.2.3