Closed cardin closed 1 year ago
What does running set home
report?
Tilde expansion first looks up %HOME%
.
If that's not set, it looks up %HOMEDRIVE%
and %HOMEPATH%. If those aren't set, it looks up
%USERPROFILE%`.
If that's not set, it does nothing.
So, probably %HOME%
or %HOMEDRIVE%
refer to j:
.
Ah, I've discovered the problem. While %HOME%
is unset, but indeed %HOMEDRIVE%
was set to j:
by the sys admin.
While I could not overwrite SYS ENV %HOMEDRIVE%
at a USER ENV level, your explanation of how expandtilde()
resolves, gave me the idea to set %HOME%
instead. So now the expandtilde()
works as expected.
Thank you for the quick resolution!
Martin originally made Clink v0.4.9 synthesize %HOME% from %HOMEDRIVE%%HOMEPATH% if both are set, in commit 8643c264ecbad6ad43de4e6d5de7aa2590545296 in December 2015.
Your sys admin had also set %HOMEPATH%
, right? Clink shouldn't use HOMEDRIVE unless both HOMEDRIVE and HOMEPATH are set. If both are set, then they're supposed to supersede USERPROFILE, for specifying where the user's personal files are located. This is the (Windows) way. 🤷♂️
Yes you're right, my sysadmin had set %HOMEPATH%
= \
Your sys admin had also set %HOMEPATH%, right? Clink shouldn't use HOMEDRIVE unless both HOMEDRIVE and HOMEPATH are set. If both are set, then they're supposed to supersede USERPROFILE, for specifying where the user's personal files are located. This is the (Windows) way. 🤷♂️
What a weird Windows quirk... haha
I was trying to use the
tilde_autoexpand.lua
script, and I realised it was expanding my tilde to my J: drive.Any idea why that would be the case?
System: