mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
Various fixes, remove _zargs already upstream
Many movings of local inside the actual functions. Add many missing local and remove -g(!). Fix namespacing of some parameters and functions, phases() in _scala was nice.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
declare -a opts args
|
||||
local -a opts args
|
||||
args=(
|
||||
'(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]'
|
||||
'(-r --interactive)'{-i,--interactive}'[prompt before any removal]'
|
||||
@@ -43,14 +43,14 @@ else
|
||||
fi
|
||||
|
||||
local curcontext=$curcontext state line ret=1
|
||||
declare -A opt_args
|
||||
local -A opt_args
|
||||
|
||||
_arguments -s -S -C $opts \
|
||||
$args && ret=0
|
||||
|
||||
case $state in
|
||||
(file)
|
||||
declare -a ignored
|
||||
local -a ignored
|
||||
ignored=()
|
||||
((CURRENT > 1)) &&
|
||||
ignored+=(${line[1,CURRENT-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
|
||||
|
||||
Reference in New Issue
Block a user