lsd icon indicating copy to clipboard operation
lsd copied to clipboard

Allow for -C (list entries by columns) flag - GNU coreutils 8.28

Open strazto opened this issue 5 years ago • 2 comments

My old alias:

alias l='ls -CF'

set from some config or another throws an error when alias ls='lsd' is set.

error: Found argument '-C' which wasn't expected, or isn't valid in this context

I don't really know the difference between the outputs using this flag, but it'd be nice if lsd could handle the flag gracefully.

This is part of ls's api in GNU coreutils 8.28.

strazto avatar Dec 16 '20 06:12 strazto

Some reference for -C manpage: -C list entries by columns

it is the default behavior for ls in stdout. for example:

stdout without -C:

λ ls
CHANGELOG.md CODEOWNERS   Cargo.lock   Cargo.toml   LICENSE      README.md    build.rs     ci           go.mod       go.sum       src          target       tests

stdout with -C:

λ ls -C
CHANGELOG.md CODEOWNERS   Cargo.lock   Cargo.toml   LICENSE      README.md    build.rs     ci           go.mod       go.sum       src          target       tests

it is NOT the default one beside stdout, pipeline for example:

pipeline without -C:

λ ls | cat
CHANGELOG.md
CODEOWNERS
Cargo.lock
Cargo.toml
LICENSE
README.md
build.rs
ci
go.mod
go.sum
src
target
tests

pipeline with -C

λ ls -C | cat
CHANGELOG.md    Cargo.toml  build.rs    go.sum      tests
CODEOWNERS  LICENSE     ci      src
Cargo.lock  README.md   go.mod      target

zwpaper avatar Dec 17 '20 03:12 zwpaper

Related: https://github.com/Peltoche/lsd/issues/526

meain avatar Feb 09 '22 03:02 meain