From 9842a8a17fb68fcb54430d417e9072026f5413b2 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sat, 15 Aug 2026 20:35:15 +0800 Subject: [PATCH] feat(nushell): add lsa & dus wrappers to prevent column truncation `lsa` (ls -al) and `dus` (du) render the table at a fixed width of 350 so columns like size/apparent/physical are never dropped to "..." when the natural table is wider than the terminal. --- home/base/core/shells/config.nu | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/home/base/core/shells/config.nu b/home/base/core/shells/config.nu index f4f226d6..fd6e7cf2 100644 --- a/home/base/core/shells/config.nu +++ b/home/base/core/shells/config.nu @@ -70,6 +70,24 @@ $env.config.rm.always_trash = true # before an error will be generated. $env.config.recursion_limit = 50 +# ---------------------- +# Classic-style commands +# ---------------------- +# Nushell drops table columns that don't fit the terminal width and replaces +# them with "...". These wrappers render the table at a fixed width so no +# column (e.g. `size`, `apparent`, `physical`) is ever hidden. +def lsa [] { + ls -al | table --width 350 +} + +def dus [path: string = ""] { + if $path == "" { + du | table --width 350 + } else { + du $path | table --width 350 + } +} + # --------------------------- # Commandline Editor Settings # ---------------------------