lsd-rs / lsd-rs/lsd

[Feature]: add an option to turn of --classify

Open
#918 2 comments 1 reaction 1 assignee View on GitHub

@zwpaper is already working on this.

Since Sep 28, 2023.

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

Description

### Version

- [X] latest

### version

lsd 1.0.0

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

Linux

### installation

NixOS

### term

_No response_

### ls-colors

_No response_

### What happened?

I have `lsd` configured with `indicators = true`. The indicators persist when `lsd` is used non-interactively, i.e it's output is piped.

```sh
$ mkdir -p test; cd test
$ touch foo; chmod +x foo
$ lsd | xargs rm
rm: cannot remove 'foo*': No such file or directory
$ lsd
 foo*
```

There should be no files remaining. Instead, `foo` was never removed.

### What expected?

We should be able to run `lsd --classify --indicator-style=none` and the two options would cancel each other out, showing no suffixes for special files. This would mirror the option in `ls`, the recommended way to turn off `--classify` according to https://superuser.com/a/220680

In general, each configurable setting that can be turned on with an option should have an option to turn it off.

### What else?

Another potential approach is to hide the classifiers when stdout is not a tty, maybe configurable by a setting? A downside is compatibility with `ls` would break.

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.