mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-24 17:00:32 +02:00
36832: vcs_info: Remove dependency on "seq"
The "seq" utility is usually available on GNU systems only. This exchanges calls to seq with pure zsh features. Also: Less forks are good.
This commit is contained in:
parent
7a1678767f
commit
e245dd7193
2 changed files with 6 additions and 2 deletions
|
|
@ -226,7 +226,7 @@ elif [[ -d "${gitdir}/rebase-apply" ]]; then
|
|||
if [[ -f $next ]]; then
|
||||
local cur=$(< $next)
|
||||
local p subject
|
||||
for p in $(seq $(($cur - 1))); do
|
||||
for ((p = 1; p < cur; p++)); do
|
||||
git_patches_applied+=("$(printf "%04d" $p) ?")
|
||||
done
|
||||
if [[ -f "${patchdir}/msg-clean" ]]; then
|
||||
|
|
@ -245,7 +245,8 @@ elif [[ -d "${gitdir}/rebase-apply" ]]; then
|
|||
git_patches_applied+=("?")
|
||||
fi
|
||||
fi
|
||||
git_patches_unapplied=($(seq $cur $(< "${patchdir}/last")))
|
||||
local last="$(< "${patchdir}/last")"
|
||||
git_patches_unapplied=( {$cur..$last} )
|
||||
fi
|
||||
|
||||
VCS_INFO_git_handle_patches
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue