From 44de464034da0056ffb4fcbe18436624af90004e Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Fri, 24 Sep 2010 11:31:21 -0700 Subject: cleanup * set help string only if available. * use "builtin" explicitly. --- etc/bash_completion.d/20vyatta-cfg | 4 ++-- src/cstore/cstore.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index f6b02ce..22178e1 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -683,11 +683,11 @@ vyatta_config_complete () if ! vyatta_cli_shell_api setupSession; then echo 'Failed to set up config session' - exit 1 + builtin exit 1 fi # disallow 'Ctrl-D' exit, since we need special actions on 'exit' -set -o ignoreeof 1 +builtin set -o ignoreeof 1 reset_edit_level alias set=/opt/vyatta/sbin/my_set diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp index 8afa3ee..11cdb30 100644 --- a/src/cstore/cstore.cpp +++ b/src/cstore/cstore.cpp @@ -600,7 +600,7 @@ Cstore::getCompletionEnv(const vector& comps, string& env) pair hpair(comp_vals[i], ""); push_tmpl_path(hpair.first); vtw_def cdef; - if (tmpl_parse(cdef)) { + if (tmpl_parse(cdef) && cdef.def_node_help) { hpair.second = cdef.def_node_help; } else { hpair.second = ""; -- cgit v1.2.3