1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

Merge pull request #15 from fdncred/main

tweaked for better layout
This commit is contained in:
Darren Schroeder 2021-02-07 17:14:32 -06:00 committed by GitHub
commit f221ee9162
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
} {}
}