lsd-rs / lsd-rs/lsd

User/Group: display only if different from default (or allow substitution filter)

Open
#793 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
16.2k
Forks
510
PR merge metrics
No merged PRs in 30d

Description

For a lot of contexts when browsing your files, you expect the permissions to be, for example, `user staff`, so it's just visual noise and extra column width to see these in every single line. This also prevents you from easily spotting something less common, e.g., some root file.

As an illustration, notice how easier it is to spot that there is a different group in one file, and another one is owned by root, in the second example vs. the first
```
user staff name
user staff name
user staff name
user staff name
user staff name
root wheel name
user staff name
user admin name
user staff name
user staff name
user staff name
user staff name
```
```
name
name
name
name
name
root wheel name
name
admin name
name
name
name
name
```

One solution would be to have different colors, but I think a better one would be to allow a more general __text filter substitution__, e.g., it would allow you to auto-replace any occurence in the `name` column:
- `user` with 👤 (or with ` ` blank space or `_` or ...)
- `root` with 🔐
... likewise, it would allow you to auto-replace any occurence in the `group` column:
- `wheel` with ☸
- `admin` with 🛠

```
name
name
name
name
name
🔐 ☸ name
name
🛠 name
name
name
name
name
```

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file, test, or entry point is identified in the issue. Start by locating the CLI code that renders user and group columns, then review existing configuration and output tests before deciding whether default-value hiding or configurable text substitution is the intended scope. Done should be demonstrated by tests covering the chosen behavior for default and non-default owners and groups.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.