fix dirh output with reversed $dirnext

This commit is contained in:
Hideki Hamada (jakalada) 2019-01-04 08:00:34 +09:00 committed by Fabian Homborg
parent 6ef617f8e7
commit 5c689bb50c

View file

@ -22,8 +22,9 @@ function dirh --description "Print the current directory history (the prev and n
set -l dirc (count $dirnext)
if test $dirc -gt 0
set -l dirnext_rev $dirnext[-1..1]
for i in (seq $dirc)
printf '%2d) %s\n' $i $dirnext[$i]
printf '%2d) %s\n' $i $dirnext_rev[$i]
end
end
echo