public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* A $ in my path...
@ 2008-10-23 14:35 ProblematicRoutes
  2008-10-23 14:56 ` Manning, Sid
  2008-10-23 14:58 ` Mark J. Reed
  0 siblings, 2 replies; 7+ messages in thread
From: ProblematicRoutes @ 2008-10-23 14:35 UTC (permalink / raw)
  To: cygwin


Hello all,

I have just had my work system set upto use cygwin. Unfortunately, my home
directory and all other directories which are mapped to network stores and
properly backed up have a $ sign in their path:

$ pwd
//sbs01/students_home$/csmith

This $ sign causes problems everywhere - with latex, with svn, with anything
that uses ~ to refer to my home directory, because it expands to ...$/...
and bash tries to parse the $/ as a variable.

Does anyone know how to change this or hide this? It may only be a problem
with pwd and applications which use this because, e.g., when I'm in / (which
is C:\cygwin) and I type pwd I get "/" as the result.

Thanks heaps for your help!
Andrew
-- 
View this message in context: http://www.nabble.com/A-%24-in-my-path...-tp20132275p20132275.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: A $ in my path...
  2008-10-23 14:35 A $ in my path ProblematicRoutes
@ 2008-10-23 14:56 ` Manning, Sid
  2008-10-24 13:02   ` ProblematicRoutes
  2008-10-23 14:58 ` Mark J. Reed
  1 sibling, 1 reply; 7+ messages in thread
From: Manning, Sid @ 2008-10-23 14:56 UTC (permalink / raw)
  To: ProblematicRoutes, cygwin

Would this work?
cd /home
ln -s $HOME/csmith
cd csmith
export HOME=`pwd`


> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf
> Of ProblematicRoutes
> Sent: Thursday, October 23, 2008 9:34 AM
> To: cygwin@cygwin.com
> Subject: A $ in my path...
> 
> 
> Hello all,
> 
> I have just had my work system set upto use cygwin. Unfortunately, my home
> directory and all other directories which are mapped to network stores and
> properly backed up have a $ sign in their path:
> 
> $ pwd
> //sbs01/students_home$/csmith
> 
> This $ sign causes problems everywhere - with latex, with svn, with
> anything
> that uses ~ to refer to my home directory, because it expands to ...$/...
> and bash tries to parse the $/ as a variable.
> 
> Does anyone know how to change this or hide this? It may only be a problem
> with pwd and applications which use this because, e.g., when I'm in /
> (which
> is C:\cygwin) and I type pwd I get "/" as the result.
> 
> Thanks heaps for your help!
> Andrew
> --
> View this message in context: http://www.nabble.com/A-%24-in-my-path...-
> tp20132275p20132275.html
> Sent from the Cygwin list mailing list archive at Nabble.com.
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: A $ in my path...
  2008-10-23 14:35 A $ in my path ProblematicRoutes
  2008-10-23 14:56 ` Manning, Sid
@ 2008-10-23 14:58 ` Mark J. Reed
  2008-10-23 16:51   ` ProblematicRoutes
  1 sibling, 1 reply; 7+ messages in thread
From: Mark J. Reed @ 2008-10-23 14:58 UTC (permalink / raw)
  To: cygwin

On Thu, Oct 23, 2008 at 10:34 AM, ProblematicRoutes wrote:
> $ pwd
> //sbs01/students_home$/csmith
>

> This $ sign causes problems everywhere - with latex, with svn, with anything
> that uses ~ to refer to my home directory, because it expands to ...$/...
> and bash tries to parse the $/ as a variable.

Really?  I'm hard-pressed to think of ways that you could use ~ or
$HOME that would then lead to the result of that expansion being
re-analyzed for further parameter expansion as well.  It seems like
you'd have to go out of your way to make that be a problem.

But the workaround, if you have the privileges to do it, would be to
make a $-less symbolic link and change your passwd entry to match.

-- 
Mark J. Reed <markjreed@gmail.com>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: A $ in my path...
  2008-10-23 14:58 ` Mark J. Reed
@ 2008-10-23 16:51   ` ProblematicRoutes
  2008-10-23 22:09     ` Lee D.Rothstein
  0 siblings, 1 reply; 7+ messages in thread
From: ProblematicRoutes @ 2008-10-23 16:51 UTC (permalink / raw)
  To: cygwin


Mark J. Reed wrote:
> 
> On Thu, Oct 23, 2008 at 10:34 AM, ProblematicRoutes wrote:
>> $ pwd
>> //sbs01/students_home$/csmith
>>
> 
>> This $ sign causes problems everywhere - with latex, with svn, with
>> anything
>> that uses ~ to refer to my home directory, because it expands to ...$/...
>> and bash tries to parse the $/ as a variable.
> 
> Really?  I'm hard-pressed to think of ways that you could use ~ or
> $HOME that would then lead to the result of that expansion being
> re-analyzed for further parameter expansion as well.  It seems like
> you'd have to go out of your way to make that be a problem.
> 
> But the workaround, if you have the privileges to do it, would be to
> make a $-less symbolic link and change your passwd entry to match.
> 

Dear Mark, Sid

I'm not sure why it is being expanded then, but if I use includes in latex
(for example, \input{../someinclude.tex}) or a script like the following
that causes the problem to occur with cygwin:

#!/bin/bash

echo Committing /cygwin directory in repo:
svn ci ~

I will try yours and Sid's solutions tomorrow (I think they're the same
idea? Correct me if I've misunderstood your suggestion!)  when I'm back in
the office, and hopefully they will fix the problem.

Andrew
-- 
View this message in context: http://www.nabble.com/A-%24-in-my-path...-tp20132275p20135109.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: A $ in my path...
  2008-10-23 16:51   ` ProblematicRoutes
@ 2008-10-23 22:09     ` Lee D.Rothstein
  0 siblings, 0 replies; 7+ messages in thread
From: Lee D.Rothstein @ 2008-10-23 22:09 UTC (permalink / raw)
  To: cygwin

ProblematicRoutes wrote:
> Mark J. Reed wrote:
>   
>> On Thu, Oct 23, 2008 at 10:34 AM, ProblematicRoutes wrote:
>>     
>> This $ sign causes problems everywhere - with latex, with svn, with
>>> anything
>>> that uses ~ to refer to my home directory, because it expands to ...$/...
>>> and bash tries to parse the $/ as a variable.
>>>       
>> But the workaround, if you have the privileges to do it, would be to
>> make a $-less symbolic link and change your passwd entry to 
>>     
>
> I will try yours and Sid's solutions tomorrow (I think they're the same
> idea? Correct me if I've misunderstood your suggestion!)  when I'm back in
> the office, and hopefully they will fix the problem.
>
> Andrew
>   
If shortcuts don't work, here's two other ideas:

    * Cygwin mount -- mount a sane path to the problematic path
    * NTFS junction point (like a *ux soft link) -- junction a sane path
      to the problematic path


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: A $ in my path...
  2008-10-23 14:56 ` Manning, Sid
@ 2008-10-24 13:02   ` ProblematicRoutes
  2008-10-24 14:11     ` Mark J. Reed
  0 siblings, 1 reply; 7+ messages in thread
From: ProblematicRoutes @ 2008-10-24 13:02 UTC (permalink / raw)
  To: cygwin




>> -----Original Message-----
>> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf
>> Of ProblematicRoutes
>> Sent: Thursday, October 23, 2008 9:34 AM
>> To: cygwin@cygwin.com
>> Subject: A $ in my path...
>> 
>> 
>> Hello all,
>> 
>> I have just had my work system set upto use cygwin. Unfortunately, my
>> home
>> directory and all other directories which are mapped to network stores
>> and
>> properly backed up have a $ sign in their path:
>> 
>> $ pwd
>> //sbs01/students_home$/csmith
>> 
>> This $ sign causes problems everywhere - with latex, with svn, with
>> anything
>> that uses ~ to refer to my home directory, because it expands to ...$/...
>> and bash tries to parse the $/ as a variable.
>> 
>> Does anyone know how to change this or hide this? It may only be a
>> problem
>> with pwd and applications which use this because, e.g., when I'm in /
>> (which
>> is C:\cygwin) and I type pwd I get "/" as the result.
>>
> 
> Would this work?
> cd /home
> ln -s $HOME/csmith
> cd csmith
> export HOME=`pwd`
> 

This worked nicely, and so I've added it to my .bashrc - thanks!
Andrew
-- 
View this message in context: http://www.nabble.com/A-%24-in-my-path...-tp20132275p20149694.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: A $ in my path...
  2008-10-24 13:02   ` ProblematicRoutes
@ 2008-10-24 14:11     ` Mark J. Reed
  0 siblings, 0 replies; 7+ messages in thread
From: Mark J. Reed @ 2008-10-24 14:11 UTC (permalink / raw)
  To: cygwin

Sid Manning> Would this work?
SM> cd /home
SM> ln -s $HOME/csmith
SM> cd csmith
SM> export HOME=`pwd`

Problematic Routes> This worked nicely, and so I've added it to my
.bashrc - thanks!

I recommend protecting it to avoid repeating the process and getting
broken links; this should work (and also leaves $HOME alone if any of
the steps fail):

case "$HOME" in
   *$*)  cd /home &&  ln -s "$HOME" ./csmith && cd ./csmith && HOME="${PWD}";;
esac





> Andrew
> --
> View this message in context: http://www.nabble.com/A-%24-in-my-path...-tp20132275p20149694.html
> Sent from the Cygwin list mailing list archive at Nabble.com.
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>



-- 
Mark J. Reed <markjreed@gmail.com>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-24 14:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-23 14:35 A $ in my path ProblematicRoutes
2008-10-23 14:56 ` Manning, Sid
2008-10-24 13:02   ` ProblematicRoutes
2008-10-24 14:11     ` Mark J. Reed
2008-10-23 14:58 ` Mark J. Reed
2008-10-23 16:51   ` ProblematicRoutes
2008-10-23 22:09     ` Lee D.Rothstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).