feat: prefer eza over lsd in all ls-related functions
fix: clean stale wraps metadata fix: ensure user functions take precedence over CachyOS overrides
This commit is contained in:
+11
-1
@@ -6,7 +6,17 @@
|
|||||||
# ╰──────────────────────────────────────────────────────────╯
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
# ──────────────────────── Source CachyOS configs ────────────────────────
|
# ──────────────────────── Source CachyOS configs ────────────────────────
|
||||||
source /usr/share/cachyos-fish-config/cachyos-config.fish
|
if test -f /usr/share/cachyos-fish-config/cachyos-config.fish
|
||||||
|
source /usr/share/cachyos-fish-config/cachyos-config.fish
|
||||||
|
end
|
||||||
|
|
||||||
|
# CachyOS defines aliases for ls/lt/cleanup that shadow our function files.
|
||||||
|
# Erase them and immediately source our versions.
|
||||||
|
for _fname in ls lt cleanup
|
||||||
|
functions --erase $_fname
|
||||||
|
source $__fish_config_dir/functions/$_fname.fish
|
||||||
|
end
|
||||||
|
set --erase _fname
|
||||||
|
|
||||||
# ───────────────────────── Source user secrets ──────────────────────────
|
# ───────────────────────── Source user secrets ──────────────────────────
|
||||||
if test -f $HOME/.config/.user-dots/fish/secrets.fish
|
if test -f $HOME/.config/.user-dots/fish/secrets.fish
|
||||||
|
|||||||
+4
-2
@@ -1,8 +1,10 @@
|
|||||||
# Copyright (C) 2026 Rootiest
|
# Copyright (C) 2026 Rootiest
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
function l --wraps='lsd --almost-all --long' --description 'alias l=lsd --almost-all --long'
|
function l --description 'Long listing, all files'
|
||||||
if which lsd >/dev/null 2>&1
|
if which eza >/dev/null 2>&1
|
||||||
|
eza --all --long --git --header --icons --color=auto --hyperlink $argv
|
||||||
|
else if which lsd >/dev/null 2>&1
|
||||||
lsd --almost-all --long --git --header --hyperlink=auto $argv
|
lsd --almost-all --long --git --header --hyperlink=auto $argv
|
||||||
else
|
else
|
||||||
command ls --color=auto --almost-all -l $argv
|
command ls --color=auto --almost-all -l $argv
|
||||||
|
|||||||
+4
-2
@@ -1,8 +1,10 @@
|
|||||||
# Copyright (C) 2026 Rootiest
|
# Copyright (C) 2026 Rootiest
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
function lS --wraps='lsd --oneline --classic' --description 'alias lS=lsd --oneline --classic'
|
function lS --description 'Size-sorted listing'
|
||||||
if which lsd >/dev/null 2>&1
|
if which eza >/dev/null 2>&1
|
||||||
|
eza --sort=size --icons --color=auto --hyperlink $argv
|
||||||
|
else if which lsd >/dev/null 2>&1
|
||||||
lsd --oneline --classic $argv
|
lsd --oneline --classic $argv
|
||||||
else
|
else
|
||||||
command ls $argv
|
command ls $argv
|
||||||
|
|||||||
+5
-3
@@ -1,10 +1,12 @@
|
|||||||
# Copyright (C) 2026 Rootiest
|
# Copyright (C) 2026 Rootiest
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
function llm --wraps='lsd --timesort --long' --description 'alias llm=lsd --timesort --long'
|
function llm --description 'Long listing sorted by modification time'
|
||||||
if which lsd >/dev/null 2>&1
|
if which eza >/dev/null 2>&1
|
||||||
|
eza --long --sort=modified --git --header --icons --color=auto --hyperlink $argv
|
||||||
|
else if which lsd >/dev/null 2>&1
|
||||||
lsd --timesort --long --git --header --hyperlink=auto $argv
|
lsd --timesort --long --git --header --hyperlink=auto $argv
|
||||||
else
|
else
|
||||||
command ls color=auto -l $argv
|
command ls --color=auto -lt $argv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+5
-2
@@ -1,8 +1,11 @@
|
|||||||
# Copyright (C) 2026 Rootiest
|
# Copyright (C) 2026 Rootiest
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
function ls --wraps=lsd --wraps='lsd --hyperlink=auto' --description 'alias ls=lsd'
|
function ls --description 'List files'
|
||||||
if which lsd >/dev/null 2>&1
|
if which eza >/dev/null 2>&1
|
||||||
|
eza --oneline --icons --color=auto --hyperlink $argv
|
||||||
|
|
||||||
|
else if which lsd >/dev/null 2>&1
|
||||||
lsd --hyperlink=auto $argv
|
lsd --hyperlink=auto $argv
|
||||||
else
|
else
|
||||||
command ls --color=auto $argv
|
command ls --color=auto $argv
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
# Copyright (C) 2026 Rootiest
|
# Copyright (C) 2026 Rootiest
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
function lstree --wraps='ls --tree' --description 'alias lstree=ls --tree'
|
function lstree --description 'Full recursive tree listing'
|
||||||
if which lsd >/dev/null 2>&1
|
if which eza >/dev/null 2>&1
|
||||||
|
eza --tree --icons --color=auto --hyperlink $argv
|
||||||
|
else if which lsd >/dev/null 2>&1
|
||||||
lsd --tree --hyperlink=auto $argv
|
lsd --tree --hyperlink=auto $argv
|
||||||
else
|
else
|
||||||
command ls --color=auto -R $argv
|
command ls --color=auto -R $argv
|
||||||
|
|||||||
+4
-2
@@ -1,8 +1,10 @@
|
|||||||
# Copyright (C) 2026 Rootiest
|
# Copyright (C) 2026 Rootiest
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
function lt --wraps='lsd --tree --depth=2' --description 'alias lt=lsd --tree --depth=2'
|
function lt --description 'Tree listing, depth 2'
|
||||||
if which lsdq >/dev/null 2>&1
|
if which eza >/dev/null 2>&1
|
||||||
|
eza --tree --level=2 --icons --color=auto --hyperlink $argv
|
||||||
|
else if which lsd >/dev/null 2>&1
|
||||||
lsd --tree --depth=2 --hyperlink=auto $argv
|
lsd --tree --depth=2 --hyperlink=auto $argv
|
||||||
else
|
else
|
||||||
command ls --color=auto -R $argv
|
command ls --color=auto -R $argv
|
||||||
|
|||||||
+8
-2
@@ -1,6 +1,12 @@
|
|||||||
# Copyright (C) 2026 Rootiest
|
# Copyright (C) 2026 Rootiest
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
function ltr --wraps='lsd -ltr' --description 'alias ltr=lsd -ltr'
|
function ltr --description 'Reversed time-sorted listing'
|
||||||
lsd -ltr $argv
|
if which eza >/dev/null 2>&1
|
||||||
|
eza --long --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
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user