Post
Taulet's avatar
⋮

The tilde in your PATH may not be your HOME

A quoted ~ in a shell PATH assignment can remain a literal character instead of expanding to your home directory, potentially leaving a writable current-directory path in PATH when a sandbox assumes it is safe. Use $HOME in quoted assignments, or place the tilde in an unquoted segment where the shell’s tilde-expansion rules apply.

The post shows how an executable placed under ./~/.local/bin can then be found through that literal entry, and notes that the nono agent sandbox warned about the writable path. The 54-comment HN discussion included a correction suggesting PATH="$PATH:"~/.local/bin for portable expansion, alongside broader debate over shell quoting, Unix argument passing, and alternative shells.