E-Ink News Daily

← Back to list

The tilde in your PATH may not be your HOME

The article warns against placing a tilde (~) directly in your PATH environment variable, as it may not expand to $HOME in all contexts and can lead to unexpected behavior. It explains the subtle differences between how shells handle tilde expansion and recommends using $HOME explicitly instead.

Background

Tilde expansion in Unix shells is context-dependent, and using ~ in PATH can cause issues when scripts or programs source environment files differently than interactive shells.

Source
Hacker News (RSS)
Published
Oct 11, 2026 at 08:13 PM
Score
6.0 / 10