This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: -a $HOME/.bashrc and -a ~/.bashrc produce different results
On Thu, May 19, 2011 at 11:06 PM, Eric Blake wrote:
> "$HOME" expands $HOME, but "~/.bashrc" does _not_ expand ~. ?For
> tilde-expansion to occur, it must be unquoted.
Not only that, it has to be the first character:
<quote>
3.5.2 Tilde Expansion
---------------------
If a word begins with an unquoted tilde character (`~'), ...
</endquote>
I've been bitten by this in a makefile when I wrote:
SOMETOOL := ~/sometool
CPPFLAGS += -I$(SOMETOOL)/include
and -I~/sometool/include was not expanded. I've made a rule to
only use ${HOME} in makefiles.
Csaba
--
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple