Line 0
Link Here
|
|
|
1 |
--- Completion/Unix/Command/_locate.orig 2006-09-27 09:50:25.000000000 -0500 |
2 |
+++ Completion/Unix/Command/_locate 2007-08-20 22:08:08.000000000 -0500 |
3 |
@@ -11,7 +11,7 @@ |
4 |
;; |
5 |
|
6 |
(locate) |
7 |
- input="$(_call_program locate $words[0] -V)" |
8 |
+ input="$(_call_program locate $words[0] -V 2>&1)" |
9 |
case $input in |
10 |
(*mlocate*) |
11 |
ltype=mlocate |
12 |
@@ -25,6 +25,10 @@ |
13 |
ltype=gnu |
14 |
;; |
15 |
|
16 |
+ (*illegal option*) |
17 |
+ ltype=bsd |
18 |
+ ;; |
19 |
+ |
20 |
# guess |
21 |
(*) |
22 |
ltype=$best_guess |
23 |
@@ -108,4 +112,17 @@ |
24 |
--help'[Show help]' \ |
25 |
'*:pattern: ' |
26 |
;; |
27 |
+ |
28 |
+ (bsd) |
29 |
+ _arguments -s : \ |
30 |
+ -0'[Output separated by NUL characters]' \ |
31 |
+ -S'[Show database statistics]' \ |
32 |
+ -c'[Output the number of matching entries]' \ |
33 |
+ -d'[Use alternative database]:database:_files' \ |
34 |
+ -i'[Ignore case distinctions in patterns]' \ |
35 |
+ -l'[Limit search results]:file limit: ' \ |
36 |
+ -m'[Use mmap instead of stdio library]' \ |
37 |
+ -s'[Use stdio instead of mmap]' \ |
38 |
+ '*:pattern: ' |
39 |
+ ;; |
40 |
esac |