lsd-rs / lsd-rs/lsd

[Feature]: support `ls -w` to specify the width/columns

Open
#928 4 comments 0 reactions 1 assignee View on GitHub

@zwpaper is already working on this.

Since Oct 3, 2023.

kind/feature
Dominant language
Rust
Stars
16.2k
Forks
510
PR merge metrics
No merged PRs in 30d

Description

### Version

- [X] latest

### version

```shell
❯ lsd --version
lsd 1.0.0
```

### What OS are you seeing the problem on?

macOS

### installation

`brew install lsd`

### term

`xterm-256color`

### ls-colors

N/A

### What happened?

My terminal window is 120 characters wide.

If I do `ls` or `lsd`, then I get multiple (3) columns in my `~/git` directory.

Now, if I pipe the output through `less` (or `cat`) I only get a single column.

The workaround for GNU ls is to use the `-w $COLUMNS` option (more conveniently defined as a shell function. The workaround for BSD ls is to `export COLUMNS`.

I don't think there's a workaround for `lsd`

### What expected?

`lsd` should offer an option, as `ls` does, to preserve multiple columns even when piped.

### What else?

See https://askubuntu.com/questions/89173/preserving-multi-column-output-from-ls-when-paging/89177#89177

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.