zsh:suffix(): Use zshisms to find --'s index
This commit is contained in:
@@ -526,11 +526,7 @@ suffix() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local i=1
|
local i=${@[(ei)--]}
|
||||||
for arg; do
|
|
||||||
[[ $arg != "--" ]] || break
|
|
||||||
: "$((i++))"
|
|
||||||
done
|
|
||||||
# NOTE: if "--" is not included in $@, i will be greater than $#, and no
|
# NOTE: if "--" is not included in $@, i will be greater than $#, and no
|
||||||
# starting point is passed to `find`, which then defaults to `.`.
|
# starting point is passed to `find`, which then defaults to `.`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user