Project ideas from Hacker News discussions.

The tilde in your PATH may not be your HOME

📝 Discussion Summary (Click to expand)

1. Tilde expansion and quoting pitfalls
Many commenters warned that unquoted ~ does not expand unless it starts a “word,” leading to literal ~ appearing in $PATH. Proper quoting (or using $HOME) avoids the problem.

  • “People quote both too often and too little.” — paulddraper
  • “That's a literal ~ in your path, the exact problem the blog post talks about.” — yencabulator
  • “better: export PATH=\"$HOME/.local/bin/:$PATH\"" — gjvc

2. PATH ordering and security trade‑offs
Debate centered on whether user‑added directories should precede or follow system paths. Prepending lets you override utilities (convenient but risky); appending prevents malicious shadowing of system binaries.

  • “Afaik it's habit to give system paths precedence so a malicious script can't shadow e.g. sudo and steal your password…” — Backslasher
  • “AFAIK it's habit to allow your scripts to override system ones, so you can customize behavior.” — paulddraper
  • “Otoh, if you don't put your local path first, you can't override system binaries that you want to override.” — toast0

3. Preference for alternative shells or language improvements
Several users argued that Bash’s footguns motivate switching to shells like fish, zsh, or nushell, or even designing a new “typed” shell language to avoid quoting and expansion issues.

  • “Or just stop using bash. It’s a terrible language to write and has tons of footguns.” — vips7L
  • “I try to encourage people to use better designed shells that have less of these footguns : Fish … Zsh … Nushell …” — malux85
  • “I actually think we do need a new programming language for the shell…” — hnlmorg

🚀 Project Ideas

Generating project ideas…

ShellPathSync

Summary

  • A cross‑shell utility that adds directories to $PATH with proper tilde and variable expansion, updating all running shell instances instantly.
  • Core value: eliminates the common footgun of export PATH="$PATH:~/.local/bin" not expanding ~ and provides a fish‑like add‑path command for bash/zsh.

Details

Key Value
Target Audience Developers and sysadmins who frequently modify $PATH in Bash, Zsh, or Fish
Core Feature sps add ~/.local/bin – expands ~, avoids duplicate entries, writes to appropriate rc file, and sends SIGUSR1 to reload PATH in existing shells
Tech Stack Go (for portable binary) + optional daemon via Unix socket; uses shell‑specific rc detection
Difficulty Medium
Monetization Revenue‑ready: SaaS tier for team sync ($5/user/mo) + free CLI

Notes

  • HN users complained about tilde not expanding and wanting something like fish_add_path (see Kccqzy comment). This tool gives that experience everywhere.
  • Could spark discussion on best practices for PATH management and reduce footguns like duplicate entries or missing expansions.

QuoteGuard Linter

Summary

  • A static linter/formatter for Bash/Zsh scripts that enforces the quoting rules highlighted in the thread (quote $var expansions, avoid unnecessary quotes around plain words, and flag tilde‑in‑middle issues).
  • Core value: catches the common quoting mistakes that lead to subtle bugs and security issues before they reach production.

Details

Key Value
Target Audience Shell script authors, DevOps engineers, CI pipelines
Core Feature Rules: (1) require double quotes around $var/$(cmd), (2) forbid quoting plain words, (3) warn when ~ appears not at start of a word in assignments, (4) suggest fish_add_path‑style alternatives
Tech Stack Rust (for speed) + Tree‑sitter Bash grammar; integrates with pre‑commit, GitHub Actions
- Difficulty Low
Monetization Hobby (open‑source) – optional hosted dashboard for teams (Revenue‑ready: $8/user/mo)

Notes

  • Commenters like paulddraper gave a “GENERAL RULE” for quoting; QuoteGuard automates it, directly addressing their ask.
  • Provides concrete utility for the many users who struggled with tilde expansion and quoting footguns.

TypedShell Playground

Summary

  • An experimental typed shell language that adds lightweight type annotations (strings, numbers, paths) and compiles to POSIX‑sh, aiming to reduce expansion footguns while preserving the ergonomics of interactive shells.
  • Core value: gives developers a “TypeScript‑like” safety net for shell scripting without leaving the terminal.

Details

Key Value
Target Audience Developers who write complex shell scripts or want safer automation
Core Feature In‑terminal REPL (tsh) with type‑checked variables, path literals, and automatic quoting; compiles to clean Bash/Zsh
Tech Stack TypeScript‑like language implemented in Rust, using Wasm for the REPL; compiles via tshc to sh
Difficulty High
Monetization Hobby (research project) – potential future premium plugins for IDEs

Notes

  • Several HNers (hope some typescript‑like “typed shell” becomes mainstream) expressed desire for a safer shell; this project directly answers that.
  • Offers a playground for discussion about type‑safe shell constructs and could reduce errors like unquoted tilde or word splitting.

Read Later