Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Recognize more shell commands as code

Open Beginner friendly
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
shell, typescript
Domain
tooling

Research direction

Start in src/shared/classify.ts, where the SHELL_LINE regex used by looksLikeCode matches a line's leading command name and gives a bonus for flags. Add the listed tools (cargo, grep, tar, ssh, gh, scp, rsync, sed, awk, uv, deno, terraform, ffmpeg) without adding ambiguous English words like make, go, find or sort. Then extend the looksLikeCode tests in tests/classify.test.ts with positive cases and a prose sentence in the "leaves prose alone" test, and confirm pnpm test passes.

Written by the indexing model from the issue text.

Description

enhancement good first issue

Code cards get a monospace font and a light syntax tint. One-line shell commands are recognized by how they start (git , npm , docker , kubectl …) plus a bonus point for flags, so docker ps -a is code. Lots of everyday tools aren't on the list, though, so these all land as plain text today:

cargo build --release
grep -rn foo .
tar -xzf file.tar.gz
ssh -i key.pem user@host
gh pr create --fill
Where to look
  • src/shared/classify.ts: the SHELL_LINE regex used by looksLikeCode
  • tests/classify.test.ts: the looksLikeCode tests
Done when
  • The commands above are detected as code. Other good candidates: scp, rsync, sed, awk, uv, deno, terraform, ffmpeg
  • Prose still isn't. Leave out commands that are also everyday English words, like make, go, find or sort: "make sure the app is closed" has to stay text. Add a sentence to the "leaves prose alone" test for anything borderline
  • pnpm test passes

Out of scope: commands without flags (git status) need more than one signal to count as code. That's deliberate, so leave it as it is.

Suggested pull request title: feat(classify): recognize more shell commands as code

New to OpenPaste? CONTRIBUTING.md covers setup, the code conventions and the checks to run before a pull request (pnpm typecheck, pnpm test, pnpm format, pnpm cleaner). Leave a comment if you're picking this up so nobody doubles up.


Generated by Claude Code

Dominant language
TypeScript
Stars
0
Forks
3
PR merge metrics
No merged PRs in 30d

Getting set up

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 alexsilver8/openpaste

All issues in alexsilver8/openpaste

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.