[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-313-gc36b68c

Ville Skyttä ville.skytta at iki.fi
Tue May 24 15:55:11 UTC 2011


The following commit has been merged in the master branch:
commit 08017ee3b2facecc11ee7a7ef8217f07fef171a0
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri May 20 20:44:37 2011 +0300

    cfagent: Use _parse_help.

diff --git a/completions/cfengine b/completions/cfengine
index 5470fbd..d959b79 100644
--- a/completions/cfengine
+++ b/completions/cfengine
@@ -2,17 +2,6 @@
 
 have cfagent || return
 
-_cfagent_options()
-{
-    COMPREPLY=( $( compgen -W '--sysadm --force-net-copy --no-check-files \
-        --no-check-mounts --debug --define --no-edits --enforce-links --file \
-        --help --no-hard-classes --no-ifconfig --inform --no-copy --no-lock \
-        --traverse-links --delete-stale-links --no-mount --no-modules \
-        --dry-run --negate --parse-only --no-processes --no-splay \
-        --no-commands --silent --no-tidy --use-env --underscore-classes \
-        --verbose --version --no-preconf --no-links --quiet' -- "$cur" ) )
-}
-
 _cfagent()
 {
     local cur prev words cword
@@ -26,7 +15,7 @@ _cfagent()
     esac
 
     if [[ "$cur" == -* ]]; then
-        _cfagent_options
+        COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
     fi
 } &&
 complete -F _cfagent cfagent
@@ -69,7 +58,7 @@ _cfrun()
             fi
             ;;
         2)
-            _cfagent_options
+            COMPREPLY=( $( compgen -W '$( _parse_help cfagent )' -- "$cur" ) )
             ;;
     esac
 } &&

-- 
bash-completion



More information about the Bash-completion-commits mailing list