nushell / nushell/nushell

option to ignore blank lines with `uniq`

Open
#9,122 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

category:enhancement status:more-information-needed status:needs-triage
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 19h
Merged PRs (30d)
85

Description

Related problem

I was modifying my .gitignore with nu to add some paths and then applied uniq and all my blank lines formatting gone, which is not cool

Describe the solution you'd like

Add an option for uniq to ignore empty lines/nulls or an option to specify which kind of values should be ignored like uniq --ignore "" or uniq --ignore '^\s*$'

Describe alternatives you've considered

Ignore by predicate closure

Additional context and details

No response

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating the uniq command implementation and its existing option or predicate handling. Define how blank lines or null values should be ignored, then verify that ordinary values remain unchanged and that the requested ignore behavior works for the .gitignore use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, shell
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.