IlanCosman / tide

🌊 The ultimate Fish prompt.
MIT License
2.74k stars 103 forks source link

Fix `_tide_pwd` when the user's `HOME` contains spaces. #482

Open alexrp opened 5 months ago

alexrp commented 5 months ago

On my Windows system, for whatever reason, my HOME is C:\Users\Alex Rønne Petersen rather than the usual C:\Users\alex kind of thing you'd expect. (And yes, this has found a great many bugs in various pieces of software. 😄)

This would lead to more and more errors the deeper into a directory I went:

❯ cd /z
❯ cd Source
string replace: too many arguments
❯ cd tests
string replace: too many arguments
string replace: too many arguments
❯ cd cs
string replace: too many arguments
string replace: too many arguments
string replace: too many arguments
❯ cd bin
string replace: too many arguments
string replace: too many arguments
string replace: too many arguments
string replace: too many arguments

Quoting the use of $HOME here fixes the issue.

Description

Motivation and Context

Closes #

Screenshots (if appropriate)

How Has This Been Tested

Checklist

alexrp commented 5 months ago

I'm new to fish and barely have any idea what I'm doing, so hopefully this change makes sense. :eyes: