Don't Put Tilde In Your Path
Summary
一篇技术博文指出在 shell 配置中用引号包裹的 `PATH="$PATH:~/.local/bin"` 不会展开波浪号,导致当前目录下的字面 `./~/` 路径被加入 PATH,带来潜在劫持风险;建议改用 `$HOME`,并介绍了 nono 沙箱工具的相关警告与排查方法。
View Cached Full Text
Cached at: 10/11/26, 12:39 PM
Similar Articles
A tale of two path separators (2021)
Explains how macOS handles two path separators (slashes and colons) due to its dual heritage from classic Mac OS and NeXTSTEP, and how this leads to files appearing with slashes in Finder but colons in the terminal.
A shell exclamation mark is not for yelling. Be lazy
An educational article explaining shell event designators (history expansion) like !! and !$ to reuse and modify previous commands lazily in bash, zsh, and other shells.
@dabit3: this sucks, there's a simple way to prevent this from ever happening: add a PreToolUse hook that hard-blocks any comman…
Bash Guard is a simple hook that blocks risky shell commands (like sudo, rm outside project) before local coding agents run them, preventing accidental file deletion. Supports Claude Code, Codex CLI, and Devin CLI.
@BohuTANG: After quantification, it turns out that pi's current 4 tools (read / bash / edit / write) plus glob and grep can go up another level. These two are high-frequency tools, but relying on the LLM to piece together a usable bash to replace them is actually quite difficult — it often...
BohuTANG found through quantitative analysis that adding dedicated grep and glob functions to the pi tool reduces the detours of LLM-generated bash and improves efficiency.
@PierceZhang34: Practical Guide to SSH Tunnels. Although I use SSH tunnels daily, it always takes a while to recall the correct command. Should it be a local or remote tunnel? What parameters are needed? Is the port order local:remote or the reverse? Through a series of experiments, the author created a visual cheat sheet. Link: http:…
This tutorial provides a visual cheat sheet and practical labs for SSH local and remote port forwarding, covering common use cases like accessing private databases and exposing local servers.