This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

.bash_profile and spaces


Hello there!

I've looked into this list archives and haven't found this issue being
discussed before, so I've decided to post it.

It's my first time using cygwin, and I've noticed that the .bash_profile
file came with the following content:

--------------------8<--------------------
if [ -e ${HOME}/.bashrc ] ; then
  source ${HOME}/.bashrc
fi
--------------------8<--------------------

Well, the thing is that neither this test neither the command line would
work with directories containing spaces.

I think that it's very common for windows users to have spaces on their
usernames (my case), which would automatically include a space into the
${HOME} variable.

The solution I've found to fix this issue is to set commas around both
lines, resulting in this:

--------------------8<--------------------
if [ -e "${HOME}/.bashrc" ] ; then
  source "${HOME}/.bashrc"
fi
--------------------8<--------------------

What do you say about it?

Thanks,
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Felipe Franciosi <ozzy@cpad.pucrs.br>
 http://www.cpad.pucrs.br/~ozzy/
 Porto Alegre, RS     +55-51-9123-0557
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]