mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Fixed negative indices in the seq command
This commit is contained in:
parent
8a46a8ecb2
commit
0cf2a1eb33
1 changed files with 5 additions and 1 deletions
6
seq.in
6
seq.in
|
@ -45,4 +45,8 @@ for i in $from $step $to
|
|||
end
|
||||
end
|
||||
|
||||
echo "for( i=$from; i<=$to ; i+=$step ) i;" | bc
|
||||
if [ $step -ge 0 ]
|
||||
echo "for( i=$from; i<=$to ; i+=$step ) i;" | bc
|
||||
else
|
||||
echo "for( i=$from; i>=$to ; i+=$step ) i;" | bc
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue