[Bash-completion-commits] [SCM] bash-completion branch, master, updated. eced7126a30bb62c49924f0b2dc61f0131317c00
Guillaume Rousse
guillomovitch at zarb.org
Sun May 17 20:13:17 UTC 2009
The following commit has been merged in the master branch:
commit a10c98e0fd0d00c170181e05c009458aedd69cc8
Author: Guillaume Rousse <guillomovitch at zarb.org>
Date: Sun May 17 21:53:51 2009 +0200
split ntpdate completion
diff --git a/bash_completion b/bash_completion
index 5dbca5d..8e51a10 100644
--- a/bash_completion
+++ b/bash_completion
@@ -8324,37 +8324,6 @@ _getent()
} &&
complete -F _getent getent
-# ntpdate(1) completion
-#
-have ntpdate &&
-_ntpdate()
-{
- local cur prev
-
- COMPREPLY=()
- cur=`_get_cword`
- prev=${COMP_WORDS[COMP_CWORD-1]}
-
- case $prev in
- -k)
- _filedir
- return 0
- ;;
- -U)
- COMPREPLY=( $( compgen -u $cur ) )
- return 0
- ;;
- esac
-
- if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '-4 -6 -b -B -d -Q -q -s -u -v -a\
- -e -k -p -o -r -t' -- $cur ) )
- else
- _known_hosts
- fi
-} &&
-complete -F _ntpdate ntpdate
-
# sysctl(8) completion
#
have sysctl &&
diff --git a/to_review/rpmcheck b/contrib/ntpdate
similarity index 51%
copy from to_review/rpmcheck
copy to contrib/ntpdate
index c27592b..3d5f2b3 100644
--- a/to_review/rpmcheck
+++ b/contrib/ntpdate
@@ -1,10 +1,10 @@
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# ex: ts=8 sw=8 noet filetype=sh
#
-# bash completion for rpmcheck
+# bash completion for ntpdate
-have rpmcheck &&
-_rpmcheck()
+have ntpdate &&
+_ntpdate()
{
local cur prev
@@ -13,18 +13,21 @@ _rpmcheck()
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
- -base)
+ -k)
_filedir
return 0
;;
+ -U)
+ COMPREPLY=( $( compgen -u $cur ) )
+ return 0
+ ;;
esac
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '-explain -failures -successes \
- -dump -dump-all -base -help -compressed-input' \
- -- $cur ) )
+ COMPREPLY=( $( compgen -W '-4 -6 -b -B -d -Q -q -s -u -v -a\
+ -e -k -p -o -r -t' -- $cur ) )
else
- _filedir
+ _known_hosts
fi
} &&
-complete -F _rpmcheck rpmcheck $files
+complete -F _ntpdate ntpdate
--
bash-completion
More information about the Bash-completion-commits
mailing list