diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2009-02-18 16:53:17 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2009-02-18 16:53:17 -0800 |
commit | 0a679fee7aee99501dbe4502f4485d6c3dc92baf (patch) | |
tree | 167a6dd7c67324076660fe960becdf041f97fc02 /etc/bash_completion.d/20vyatta-cfg | |
parent | 06b31be93c79a250a23ebf40bc929c3dad85ce97 (diff) | |
download | vyatta-cfg-0a679fee7aee99501dbe4502f4485d6c3dc92baf.tar.gz vyatta-cfg-0a679fee7aee99501dbe4502f4485d6c3dc92baf.zip |
fix for bug 4138: reset *glob after completion
Diffstat (limited to 'etc/bash_completion.d/20vyatta-cfg')
-rwxr-xr-x | etc/bash_completion.d/20vyatta-cfg | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 5589d69..515ad18 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -823,6 +823,7 @@ vyatta_config_complete () generate_pipe_help vyatta_completions=( "${_vyatta_pipe_completions[@]}" ) vyatta_do_complete + eval $restore_shopts return fi @@ -863,6 +864,7 @@ vyatta_config_complete () generate_help_text hitems hstrs vyatta_completions=( "${hitems[@]}" ) vyatta_do_complete + eval $restore_shopts return fi @@ -886,6 +888,7 @@ vyatta_config_complete () if [ "$command" == "exit" ]; then if (( num_comp > 1 || ( end_space && num_comp > 0 ) )); then COMPREPLY=() + eval $restore_shopts return fi declare -a hitems=( "discard" ) @@ -893,6 +896,7 @@ vyatta_config_complete () generate_help_text hitems hstrs vyatta_completions=( "discard" ) vyatta_do_complete + eval $restore_shopts return fi @@ -950,6 +954,7 @@ vyatta_config_complete () if (( idx < last_idx || ( idx == last_idx && end_space ) )); then # TODO error message? COMPREPLY=() + eval $restore_shopts return fi @@ -987,6 +992,7 @@ vyatta_config_complete () fi vyatta_completions=( "${fmatches[@]}" ) vyatta_do_complete + eval $restore_shopts return fi @@ -1007,8 +1013,10 @@ vyatta_config_complete () get_tmpl_subdir_help $_tpath matches vyatta_completions=( "${matches[@]}" ) vyatta_do_complete + eval $restore_shopts return fi + eval $restore_shopts return fi @@ -1025,6 +1033,7 @@ vyatta_config_complete () get_node_value_help $_tpath fmatches vyatta_completions=( "${fmatches[@]}" ) vyatta_do_complete + eval $restore_shopts return fi @@ -1067,6 +1076,7 @@ vyatta_config_complete () fi vyatta_completions=( "${matches[@]}" ) vyatta_do_complete + eval $restore_shopts return fi @@ -1081,6 +1091,7 @@ vyatta_config_complete () get_tmpl_subdir_help $_tpath fmatches vyatta_completions=( "${fmatches[@]}" ) vyatta_do_complete + eval $restore_shopts return fi |