1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-07-31 14:17:45 +00:00

tweaked for better layout

This commit is contained in:
Darren Schroeder 2021-02-07 17:13:44 -06:00
parent 44fb3eda48
commit 37046fc441

View file

@ -9,12 +9,11 @@ def ls-wide [
ls | each -n {
build-string $(echo $it.item.name | str rpad -c ' ' -l $max_fname_size) ' ' $(echo $(build-string $it.item.size) | str lpad -c ' ' -l $max_fsize_size) ' '
if $is_empty {
if $it.index mod 3 == 0 && $it.index != 0 {
if $(= $it.index + 1) mod 3 == 0 {
echo $(char newline) | autoview
} {}
} {
if $it.index mod $columns == 0 && $it.index != 0 {
} {
if $(= $it.index + 1) mod $columns == 0 {
echo $(char newline) | autoview
} {}
}