This is the mail archive of the cygwin@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]

RE: Bash puzzle: Spaces, environment variables and tab completion


[snip $PF is a path with spaces]

> So, I ask the list:
>         Can you define $PF so that cd $PF;
>         ls $PF/Games; and ls $PF/G<tab> all work???

Yep: use single-quotes ('), not double (").  And ask not why; there are none
alive who understand the seemingly random shell quoting rules.

Note also that this doesn't do what one needs it to in all circumstances (FOR
NAME in $LIST_OF_PATHS_WITH_SPACES... comes to mind); in such cases you must
resort to the very useful "cygpath" utility (q.v.).

--
Gary R. Van Sickle
Brewer.  Patriot.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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