diff --git a/ls_mods/ls-hidden.nu b/ls_mods/ls-hidden.nu index 529cb84..94eee72 100644 --- a/ls_mods/ls-hidden.nu +++ b/ls_mods/ls-hidden.nu @@ -1 +1,6 @@ -ls -a | where | { each { echo $it.name | str starts-with '.'} } \ No newline at end of file + +def ls-hidden [ + --dir(-d):any # The directory you want to list +] { + ls -a $dir | where { ($it.name | into string | str starts-with '.') } +}