5c6691c32c
Use reverse sorting by time for eza in `ltr` function. Note: eza sorts oldest-to-newest by default, while lsd requires the --reverse flag. When the --reverse flag is used in eza the listing is done newest-to-oldest which is not the intended direction.
13 lines
480 B
Fish
13 lines
480 B
Fish
# Copyright (C) 2026 Rootiest
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
function ltr --description 'Reversed time-sorted listing'
|
|
if which eza >/dev/null 2>&1
|
|
eza --long --all --sort=modified --icons --hyperlink --color=auto --color-scale=age --color-scale-mode=gradient $argv
|
|
else if which lsd >/dev/null 2>&1
|
|
lsd --long --all --sort=time --reverse --color=auto --hyperlink=always $argv
|
|
else
|
|
command ls --color=auto -ltr $argv
|
|
end
|
|
end
|