Re: [PATCH 1/1] mingw: handle absolute paths in expand_user_path()
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Nov 8, 2018, 17:40 UTC
- Message-ID
- <CAPig+cQMR8PGhtQUTtdshNy80Ej-L2vT8_3yHXm=jCM58_fAjQ@mail.gmail.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.1811081639210.39@tvgsbejvaqbjf.bet>
On Thu, Nov 8, 2018 at 10:45 AM Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 12 quoted lines
> On Thu, 8 Nov 2018, Duy Nguyen wrote: > > One thing I had in mind when proposing $VARIABLE is that it opens up a > > namespace for us to expand more things (*) for example $GIT_DIR (from > > ~/.gitconfig). > > > > (*) but in a controlled way, it may look like an environment variable, > > but we only accept a selected few. And it's only expanded at the > > beginning of a path. > > I understand that desire, and I even agree. But the fact that it looks > like an environment variable, but is not, is actually a point in favor of > *not* doing this. It would violate the principle of least astonishment.
Perhaps something like $:VARIABLE, which gives the convenience of $VARIABLE, but looks sufficiently different that it shouldn't trip up readers into thinking it is one. (Well-written code checking for a DOS/Windows drive letter at the beginning of a path shouldn't be confused by it.)