News for hackers. Stuff that matters.
Re:Don't Put Tilde In Your Path by thefilmore on Sunday October 11, 2026 @02:02PM (#50045963)
You can just do:

  PATH=~/.local/bin:$PATH
PATH is already exported. Quotes are also not necessary for assignments.
Re:Don't Put Tilde In Your Path by stkdump on Sunday October 11, 2026 @02:26PM (#50046234)
Looks dangerous to put a user writable directory ahead of system directories in PATH
Re:Don't Put Tilde In Your Path by bityard on Sunday October 11, 2026 @03:46PM (#50047081)
Nah, it's totally normal because you often want to deliberately override or wrap system commands for various good and convenient reasons.

If your concern is that some hacker could put an illicit binary in ~/.local/bin, then your security problems are much deeper than your PATH order.

Re:Don't Put Tilde In Your Path by russellbeattie on Sunday October 11, 2026 @02:53PM (#50046519)
While we're all getting pedantic and esoteric, in zsh you can do this:

path+=(~/.local/bin)

You don't even have to use the "export" keyword. Not that I would do this, but since we're all pointing out random shell stuff...

(In zsh the lowercase "path" variable is an array that's automatically tied to the $PATH string, so you can just add to it using parens to signify new array elements, separated by a space.)