summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-07-27 17:38:35 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-07-27 17:40:26 -0700
commit935f1ce7ee4d4312d6d831eae31cf8448013ec05 (patch)
treee09624aa99af33b01b43cb4c004e1df11e77114f /etc
parent5dc05fab7f408cc342409c5278e2277126240ec0 (diff)
downloadvyatta-cfg-935f1ce7ee4d4312d6d831eae31cf8448013ec05.tar.gz
vyatta-cfg-935f1ce7ee4d4312d6d831eae31cf8448013ec05.zip
handle single quotes in comp_help
(cherry picked from commit 2c2d2f6e9c3e27a5ab7422ff6b3474ca901de4da)
Diffstat (limited to 'etc')
-rwxr-xr-xetc/bash_completion.d/20vyatta-cfg3
1 files changed, 2 insertions, 1 deletions
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)