ofek / userpath

Cross-platform tool for adding locations to the user PATH, no elevated privileges required!
MIT License
151 stars 20 forks source link

Spaces in paths don't work on macOS in Fish #54

Open hynek opened 6 months ago

hynek commented 6 months ago

When Hatch installs a Python version, the paths have spaces. E.g., /Users/hynek/Library/Application Support/hatch/pythons/pypy2.7/pypy2.7-v7.3.12-macos_arm64/bin

userpath adds this to my ~/.config/fish/config.fish:

# Created by `userpath` on 2023-12-12 07:22:33
set PATH $PATH /Users/hynek/Library/Application Support/hatch/pythons/pypy2.7/pypy2.7-v7.3.12-macos_arm64/bin

That doesn't work. If I add quotes around the path, it does.

Unrelatedly, you may to switch to fish_add_path --append which is more elegant (but also needs quotes).

ofek commented 6 months ago

Thanks! Would you be interested in opening a PR?

hynek commented 6 months ago

no promises, but could you add a contributing.md that explains how to run the tests?