dircolors: --csh doesn't escape `!`

Open Beginner friendly
#16,496 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@majidninja is already working on this.

Since Nov 15, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
cli

Research direction

GNU coreutils now escapes ! in dircolors' csh output, and an ignored test already pins the expected behaviour: run cargo test --features unix --test tests -- --ignored test_dircolors::test_csh_output_escapes_bang to see it fail. Find where the --csh/setenv LS_COLORS string is built in the dircolors implementation under src/uu/dircolors/ and escape ! (and check whether other csh-special characters like ^ and # are handled nearby) alongside the existing quoting. Done means the ignored test passes and the dircolors suite is green.

Written by the indexing model from the issue text.

Description

good first issue oss-scanner U - dircolors

GNU coreutils master now escapes ! in dircolors --csh output, so csh doesn't perform history substitution when evaluating it.

$ printf '*.hey! 01;33\n' > db; dircolors -c db
setenv LS_COLORS '*.hey!=01;33:'     # uutils (csh history substitution)
setenv LS_COLORS '*.hey\!=01;33:'    # GNU

Test added in #16493: cargo test --features unix --test tests -- --ignored test_dircolors::test_csh_output_escapes_bang

Dominant language
Rust
Stars
24.4k
Forks
2.2k
Avg merge
3d 6h
Merged PRs (30d)
434

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from uutils/coreutils

All issues in uutils/coreutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.