From 71574b50304bb921380e542a6914da46b68cf59b Mon Sep 17 00:00:00 2001 From: Rootiest Date: Mon, 7 Sep 2026 20:05:15 -0400 Subject: [PATCH] feat(help): header-driven --help for listing presets 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. --- functions/lD.fish | 2 ++ functions/ld.fish | 2 ++ functions/lsr.fish | 2 ++ functions/lss.fish | 2 ++ functions/lstree.fish | 2 ++ functions/lt.fish | 2 ++ functions/ltr.fish | 2 ++ functions/lx.fish | 2 ++ 8 files changed, 16 insertions(+) diff --git a/functions/lD.fish b/functions/lD.fish index 10ee313..9849199 100644 --- a/functions/lD.fish +++ b/functions/lD.fish @@ -17,6 +17,8 @@ # EXAMPLE # lD ~/projects function lD --description 'List directories only' + __fish_help_header (status current-function) $argv; and return 0 + if which eza >/dev/null 2>&1 eza --only-dirs --long --icons --color=auto --hyperlink $argv else if which lsd >/dev/null 2>&1 diff --git a/functions/ld.fish b/functions/ld.fish index 5bc6b4a..4baa58e 100644 --- a/functions/ld.fish +++ b/functions/ld.fish @@ -17,6 +17,8 @@ # EXAMPLE # ld function ld --description 'Run lazydocker on the current Docker context' + __fish_help_header (status current-function) $argv; and return 0 + if not type -q docker echo "ld: docker is not installed" >&2 return 1 diff --git a/functions/lsr.fish b/functions/lsr.fish index 344530d..d680556 100644 --- a/functions/lsr.fish +++ b/functions/lsr.fish @@ -17,6 +17,8 @@ # 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 diff --git a/functions/lss.fish b/functions/lss.fish index 9973905..d0d09a8 100644 --- a/functions/lss.fish +++ b/functions/lss.fish @@ -17,6 +17,8 @@ # EXAMPLE # lss ~/downloads function lss --description 'Size-sorted listing' + __fish_help_header (status current-function) $argv; and return 0 + if which eza >/dev/null 2>&1 eza --oneline --long --all --sort=size --icons --color=auto --hyperlink --color-scale=size --color-scale-mode=gradient $argv else if which lsd >/dev/null 2>&1 diff --git a/functions/lstree.fish b/functions/lstree.fish index 49993ea..7c1be9f 100644 --- a/functions/lstree.fish +++ b/functions/lstree.fish @@ -17,6 +17,8 @@ # EXAMPLE # lstree ~/projects/myapp function lstree --description 'Full recursive tree listing' + __fish_help_header (status current-function) $argv; and return 0 + if which eza >/dev/null 2>&1 eza --tree --icons --color=auto --hyperlink=auto $argv else if which lsd >/dev/null 2>&1 diff --git a/functions/lt.fish b/functions/lt.fish index 6e0fcfe..b16a526 100644 --- a/functions/lt.fish +++ b/functions/lt.fish @@ -17,6 +17,8 @@ # EXAMPLE # lt ~/projects function lt --description 'Tree listing, depth 2' + __fish_help_header (status current-function) $argv; and return 0 + if which eza >/dev/null 2>&1 eza --tree --level=2 --icons --color=auto --hyperlink $argv else if which lsd >/dev/null 2>&1 diff --git a/functions/ltr.fish b/functions/ltr.fish index 11e80ab..35d6910 100644 --- a/functions/ltr.fish +++ b/functions/ltr.fish @@ -18,6 +18,8 @@ # EXAMPLE # ltr ~/projects function ltr --description 'Reversed time-sorted listing' + __fish_help_header (status current-function) $argv; and return 0 + 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 diff --git a/functions/lx.fish b/functions/lx.fish index 663be39..f467d11 100644 --- a/functions/lx.fish +++ b/functions/lx.fish @@ -17,6 +17,8 @@ # EXAMPLE # lx ~/projects function lx --description 'Extension-sorted listing' + __fish_help_header (status current-function) $argv; and return 0 + if which eza >/dev/null 2>&1 eza --long --all --sort=extension --icons --color=auto --hyperlink $argv else if which lsd >/dev/null 2>&1