From c23669ebb892e3fa000c05bfa3541a1aebf7fa20 Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Tue, 2 Dec 2025 02:33:24 -0800 Subject: [PATCH] better ls? --- users/tao/nushell/extras/alias.nu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/tao/nushell/extras/alias.nu b/users/tao/nushell/extras/alias.nu index 333193b..c6940ef 100644 --- a/users/tao/nushell/extras/alias.nu +++ b/users/tao/nushell/extras/alias.nu @@ -56,8 +56,8 @@ def --env c [path: path = "~"] { l } -def l --wrapped [path: path = ".", ...rest] { - ls ...$rest $path | sort-by type name -i -n +def l --wrapped [...rest] { + ls -t ...$rest | insert ext {|row| $row.name | parse "{name}.{ext}" | get ext | get 0? } | sort-by type ext name | reject type ext } alias list-automounts = systemctl list-units --type=automount