summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-02-16 14:17:46 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-02-16 14:35:57 -0800
commitdc2636371204f906b5d4de70e8ee0b980d539656 (patch)
treeb45ad61f3dc57421a718a5e2a420fdba2b3825e8 /etc
parent26a8f6c8ae6273ee7b5640ec9276149cab44e8db (diff)
downloadvyatta-cfg-dc2636371204f906b5d4de70e8ee0b980d539656.tar.gz
vyatta-cfg-dc2636371204f906b5d4de70e8ee0b980d539656.zip
Add completion for loadkey
Diffstat (limited to 'etc')
-rwxr-xr-xetc/bash_completion.d/20vyatta-cfg7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg
index 03cfe6c..efe1fb4 100755
--- a/etc/bash_completion.d/20vyatta-cfg
+++ b/etc/bash_completion.d/20vyatta-cfg
@@ -434,7 +434,11 @@ loadkey()
vyatta_loadkey_complete()
{
case "$COMP_CWORD" in
- 1) COMPREPLY=( $( compgen -u -- ${COMP_WORDS[1]} ) ) ;;
+ 1) if [ -z "${COMP_WORDS[1]}" ]; then
+ COMPREPLY=( $(getent passwd | awk -F: '$7 == "/bin/vbash" { print $1}') )
+ else
+ COMPREPLY=( $(compgen -u -- ${COMP_WORDS[1]} ) )
+ fi ;;
2) if [ -z "${COMP_WORDS[2]}" ]; then
echo "Possible completions:"
echo -e " <file>\t\t\t\tLoad from file on local machine"
@@ -929,6 +933,7 @@ vyatta_config_complete ()
"edit" \
"exit" \
"load" \
+ "loadkey" \
"merge" \
"rename" \
"run" \