mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 00:47:30 +00:00
fix dirh
output with reversed $dirnext
This commit is contained in:
parent
6ef617f8e7
commit
5c689bb50c
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue