lD, lsr, lss, lstree, lt, ltr, lx and ld. None shadows a real binary, so there is no disabled-fallback contract to honour, and `eza --help` documented eza rather than the preset that is these functions' entire content. First-arg-only interception leaves `lt -la --help` passing through to eza untouched.
30 lines
782 B
Fish
30 lines
782 B
Fish
# Copyright (C) 2026 Rootiest
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
# CATEGORY
|
|
# 01-file-and-directory
|
|
#
|
|
# SYNOPSIS
|
|
# lsr [args...]
|
|
#
|
|
# DESCRIPTION
|
|
# Lists files sorted by modification time in reverse (oldest first), one
|
|
# per line with icons. Uses eza, falls back to lsd, then to system ls.
|
|
#
|
|
# ARGUMENTS
|
|
# args... Arguments forwarded to the listing command
|
|
#
|
|
# EXAMPLE
|
|
# lsr ~/projects
|
|
function lsr --description 'Reversed time-sorted listing'
|
|
__fish_help_header (status current-function) $argv; and return 0
|
|
|
|
if which eza >/dev/null 2>&1
|
|
eza --oneline --sort=modified --reverse --icons --color=auto --hyperlink $argv
|
|
else if which lsd >/dev/null 2>&1
|
|
lsd -ltr $argv
|
|
else
|
|
command ls --color=auto -ltr $argv
|
|
end
|
|
end
|