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