mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-22 04:12:06 +02:00
users/12547: [0] -> [1] in completion arrays
This commit is contained in:
parent
d013696802
commit
ae7d5b5503
3 changed files with 7 additions and 3 deletions
|
@ -1,5 +1,9 @@
|
|||
2008-02-11 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* users/12547: Completion/Darwin/Type/_mac_files_for_application,
|
||||
Completion/Unix/Command/_locate: fix array indices [0] -> [1] in
|
||||
completion.
|
||||
|
||||
* Haakon Riiser: 24545: Completion/X/Command/_acroread: new
|
||||
options for version 8.
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ _mac_files_for_application() {
|
|||
|
||||
case ${#glob_patterns} in
|
||||
0) return 1 ;;
|
||||
1) _files "$opts[@]" -g "$glob_patterns[0]" ;;
|
||||
1) _files "$opts[@]" -g "$glob_patterns[1]" ;;
|
||||
*) _files "$opts[@]" -g "{${(j/,/)glob_patterns}}" ;;
|
||||
esac
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#compdef locate mlocate slocate
|
||||
|
||||
# Decide if we are using mlocate or slocate.
|
||||
local ltype basename=${words[0]:t} input
|
||||
local ltype basename=${words[1]:t} input
|
||||
# If we can't, use this guess.
|
||||
local best_guess=mlocate
|
||||
|
||||
|
@ -11,7 +11,7 @@ case $basename in
|
|||
;;
|
||||
|
||||
(locate)
|
||||
input="$(_call_program locate $words[0] -V)"
|
||||
input="$(_call_program locate $words[1] -V)"
|
||||
case $input in
|
||||
(*mlocate*)
|
||||
ltype=mlocate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue