[Bash-completion-commits] [SCM] bash-completion branch, master, updated. e69af25547425087b8e89554ca8c2c270bd6afae
Ville Skyttä
ville.skytta at iki.fi
Fri May 7 21:18:57 UTC 2010
The following commit has been merged in the master branch:
commit 95648c40c5e614911089c814bfb73d1c3abdb5d1
Author: Mario Schwalbe <schwalbe at inf.tu-dresden.de>
Date: Sat May 8 00:10:07 2010 +0300
Update find(1) completion (Alioth: #312491).
diff --git a/CHANGES b/CHANGES
index 3a09ce7..31f16de 100644
--- a/CHANGES
+++ b/CHANGES
@@ -99,6 +99,9 @@ bash-completion (2.x)
[ Igor Murzov ]
* Improve xz completion (Alioth: #312466).
+ [ Mario Schwalbe ]
+ * Update find completion (Alioth: #312491).
+
-- David Paleino <d.paleino at gmail.com> Sun, 11 Oct 2009 11:11:57 +0200
bash-completion (1.1)
diff --git a/contrib/findutils b/contrib/findutils
index e6726e9..50834be 100644
--- a/contrib/findutils
+++ b/contrib/findutils
@@ -17,7 +17,7 @@ _find()
return 0
;;
-newer|-anewer|-cnewer|-fls|-fprint|-fprint0|-fprintf|-name|-iname|\
- -lname|-ilname|-wholename|-iwholename)
+ -lname|-ilname|-wholename|-iwholename|-samefile)
_filedir
return 0
;;
@@ -49,7 +49,7 @@ _find()
COMPREPLY=( $( compgen -u -- "$cur" ) )
return 0
;;
- -exec|-ok)
+ -exec|-execdir|-ok|-okdir)
COMP_WORDS=(COMP_WORDS[0] "$cur")
COMP_CWORD=1
_command
@@ -61,10 +61,14 @@ _find()
# do nothing, just wait for a parameter to be given
return 0
;;
+ -regextype)
+ COMPREPLY=( $( compgen -W 'emacs posix-awk posix-basic \
+ posix-egrep posix-extended' -- "$cur" ) )
+ return 0
+ ;;
esac
_expand || return 0
-
# set exprfound to 1 if there is already an expression present
for i in ${COMP_WORDS[@]}; do
[[ "$i" = [-\(\),\!]* ]] && exprfound=1 && break
@@ -77,22 +81,25 @@ _find()
fi
# complete using basic options
- COMPREPLY=( $( compgen -W '-daystart -depth -follow -help -maxdepth \
- -mindepth -mount -noleaf -version -xdev -amin -anewer \
- -atime -cmin -cnewer -ctime -empty -false -fstype \
- -gid -group -ilname -iname -inum -ipath -iregex \
- -wholename \
- -links -lname -mmin -mtime -name -newer -nouser \
- -nogroup -perm -regex -size -true -type -uid -used \
- -user -xtype -exec -fls -fprint -fprint0 -fprintf -ok \
- -print -print0 -printf -prune -ls -wholename -iwholename' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '-daystart -depth -follow -help \
+ -ignore_readdir_race -maxdepth -mindepth -mindepth -mount \
+ -noignore_readdir_race -noleaf -regextype -version -warn -nowarn \
+ -xdev \
+ -amin -anewer -atime -cmin -cnewer -ctime -empty -executable -false \
+ -fstype -gid -group -ilname -iname -inum -ipath -iregex -iwholename \
+ -links -lname -mmin -mtime -name -newer -nogroup -nouser -path -perm \
+ -readable -regex -samefile -size -true -type -uid -used -user \
+ -wholename -writable -xtype \
+ -delete -exec -execdir -fls -fprint -fprint0 -fprintf -ls -ok -okdir \
+ -print -print0 -printf -prune -quit' -- "$cur" ) )
# this removes any options from the list of completions that have
# already been specified somewhere on the command line, as long as
# these options can only be used once (in a word, "options", in
# opposition to "tests" and "actions", as in the find(1) manpage).
- onlyonce=' -daystart -depth -follow -help -maxdepth -mindepth -mount \
- -noleaf -version -xdev '
+ onlyonce=' -daystart -depth -follow -help -ignore_readdir_race -maxdepth \
+ -mindepth -mount -noignore_readdir_race -noleaf -nowarn -regextype \
+ -version -warn -xdev '
COMPREPLY=( $( \
(while read -d ' ' i; do
[[ -z "$i" || "${onlyonce/ ${i%% *} / }" == "$onlyonce" ]] &&
diff --git a/test/lib/completions/find.exp b/test/lib/completions/find.exp
index 711045c..84a2f9e 100644
--- a/test/lib/completions/find.exp
+++ b/test/lib/completions/find.exp
@@ -23,11 +23,17 @@ assert_complete_any "find -fstype "
sync_after_int
-set options [list -amin -anewer -atime -cmin -cnewer -ctime -daystart -depth -empty -exec \
- -false -fls -follow -fprint -fprint0 -fprintf -fstype -gid -group -help -ilname -iname \
- -inum -ipath -iregex -iwholename -links -lname -ls -maxdepth -mindepth -mmin -mount \
- -mtime -name -newer -nogroup -noleaf -nouser -ok -perm -print -print0 -printf -prune \
- -regex -size -true -type -uid -used -user -version -wholename -xdev -xtype]
+set options [list -daystart -depth -follow -help \
+ -ignore_readdir_race -maxdepth -mindepth -mindepth -mount \
+ -noignore_readdir_race -noleaf -regextype -version -warn -nowarn \
+ -xdev \
+ -amin -anewer -atime -cmin -cnewer -ctime -empty -executable -false \
+ -fstype -gid -group -ilname -iname -inum -ipath -iregex -iwholename \
+ -links -lname -mmin -mtime -name -newer -nogroup -nouser -path -perm \
+ -readable -regex -samefile -size -true -type -uid -used -user \
+ -wholename -writable -xtype \
+ -delete -exec -execdir -fls -fprint -fprint0 -fprintf -ls -ok -okdir \
+ -print -print0 -printf -prune -quit]
assert_complete $options {find -}
--
bash-completion
More information about the Bash-completion-commits
mailing list