feat(help): render --help from function headers; stop 8 functions executing on --help #132

Merged
rootiest merged 10 commits from feat/header-driven-help into main 2026-09-08 05:39:24 +00:00
8 changed files with 16 additions and 0 deletions
Showing only changes of commit 71574b5030 - Show all commits
+2
View File
@@ -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
+2
View File
@@ -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
+2
View File
@@ -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
+2
View File
@@ -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
+2
View File
@@ -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
+2
View File
@@ -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
+2
View File
@@ -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
+2
View File
@@ -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