mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 15:37:24 +00:00
Workaround difference between BSD and GNU seq in dirh
dirh still doesn't make any sense
This commit is contained in:
parent
8c423b56df
commit
007c5bc9f0
1 changed files with 7 additions and 4 deletions
|
@ -25,10 +25,13 @@ function dirh --description "Print the current directory history (the back- and
|
|||
set_color $fish_color_history_current
|
||||
echo -n -e $current$separator
|
||||
set_color normal
|
||||
|
||||
for i in (seq (echo (count $dirnext)) -1 1)
|
||||
echo -n -e $dirnext[$i]$separator
|
||||
end
|
||||
|
||||
# BSD seq 0 outputs '1 0' instead of nothing
|
||||
if test (count $dirnext) -gt 0
|
||||
for i in (seq (echo (count $dirnext)) -1 1)
|
||||
echo -n -e $dirnext[$i]$separator
|
||||
end
|
||||
end
|
||||
|
||||
echo
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue