summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xetc/bash_completion.d/vyatta-cfg8
-rw-r--r--functions/interpreter/vyatta-cfg-run3
2 files changed, 9 insertions, 2 deletions
diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg
index aada483..c926ca1 100755
--- a/etc/bash_completion.d/vyatta-cfg
+++ b/etc/bash_completion.d/vyatta-cfg
@@ -117,7 +117,6 @@ done
vyatta_run_complete ()
{
local restore_shopts=$( shopt -p extglob nullglob | tr \\n \; )
- shopt -s extglob nullglob
local cur=${COMP_WORDS[COMP_CWORD]}
@@ -129,7 +128,12 @@ vyatta_run_complete ()
COMP_WORDS=( "${COMP_WORDS[@]:1}" )
(( COMP_CWORD -= 1 ))
- _vyatta_op_expand "$@"
+ if [[ ${COMP_WORDS[0]} =~ "/" ]]; then
+ _filedir_xspec
+ else
+ shopt -s extglob nullglob
+ _vyatta_op_expand "$@"
+ fi
if [ -z "$cur" ] ||
[[ "${COMPREPLY[0]}" =~ "$cur" ]]; then
diff --git a/functions/interpreter/vyatta-cfg-run b/functions/interpreter/vyatta-cfg-run
index 52b5b08..52a264a 100644
--- a/functions/interpreter/vyatta-cfg-run
+++ b/functions/interpreter/vyatta-cfg-run
@@ -319,6 +319,9 @@ vyatta_config_run ()
fi
if [[ "set" =~ "$1" ]]; then
_vyatta_op_run "$@"
+ elif [[ "$1" =~ "/" ]]; then
+ local args=("$@")
+ ${args[0]} "${args[@]:1}"
else
/opt/vyatta/bin/vyatta-op-cmd-wrapper "$@"
fi