From 935f1ce7ee4d4312d6d831eae31cf8448013ec05 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 27 Jul 2010 17:38:35 -0700 Subject: handle single quotes in comp_help (cherry picked from commit 2c2d2f6e9c3e27a5ab7422ff6b3474ca901de4da) --- etc/bash_completion.d/20vyatta-cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 901806d..741c2c2 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -738,10 +738,11 @@ generate_help_text () vyatta_help_text="${vyatta_help_text}${helps[$idx]}" done if [ -n "$vyatta_cfg_comp_help" ]; then + local hstr=${vyatta_cfg_comp_help//\'/\'\\\\\\\'\'} vyatta_help_text+="\\n\\nDetailed information:\\n" local sIFS=$IFS IFS=' ' - local chstr=$(echo -en "$vyatta_cfg_comp_help\n" \ + local chstr=$(echo -en "$hstr\n" \ | while read comp_help_line; do echo "vyatta_help_text+=' $comp_help_line\\n';" done) -- cgit v1.2.3