summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-12-05 13:41:36 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-12-05 13:41:36 -0800
commit39c6b2cb328ad2438a0eb6b6217715f80b2bda77 (patch)
tree12e3a70e9036eed5752ef06f327cdd0cd78cb84b /etc
parent2f9ea52c4ed0415509dcdd8c786da773cefc041b (diff)
downloadvyatta-op-39c6b2cb328ad2438a0eb6b6217715f80b2bda77.tar.gz
vyatta-op-39c6b2cb328ad2438a0eb6b6217715f80b2bda77.zip
fix op-mode "root level" completion
Diffstat (limited to 'etc')
-rw-r--r--etc/bash_completion.d/10vyatta-op7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op
index a9c5492..1fc0404 100644
--- a/etc/bash_completion.d/10vyatta-op
+++ b/etc/bash_completion.d/10vyatta-op
@@ -40,7 +40,8 @@ test -f /etc/default/vyatta && \
test ! -d "$vyatta_op_templates" && \
return 0
-declare _vyatta_op_last_comp
+declare -r _vyatta_op_last_comp_init='>>>>>>LASTCOMP<<<<<<'
+declare _vyatta_op_last_comp=${_vyatta_op_last_comp_init}
declare _vyatta_op_node_path
declare -a _vyatta_op_noncompletions _vyatta_op_completions
@@ -246,7 +247,7 @@ _vyatta_op_expand ()
${_vyatta_op_completions[@]} \
| eval ${VYATTA_PAGER:-cat}
COMPREPLY=( "" " " )
- _vyatta_op_last_comp=""
+ _vyatta_op_last_comp=${_vyatta_op_last_comp_init}
else
_vyatta_op_last_comp="${COMP_WORDS[*]}"
fi
@@ -261,7 +262,7 @@ _vyatta_op_run ()
local restore_shopts=$( shopt -p extglob nullglob | tr \\n \; )
shopt -s extglob nullglob
- _vyatta_op_last_comp=""
+ _vyatta_op_last_comp=${_vyatta_op_last_comp_init}
false; estat=$?
for arg ; do
if [ -f "$tpath/$arg/node.def" ] ; then