lsd
lsd copied to clipboard
Allow for -C (list entries by columns) flag - GNU coreutils 8.28
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.
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
Related: https://github.com/Peltoche/lsd/issues/526