Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <38D7F0A2.8C5F68F4@veritas.com> Date: Tue, 21 Mar 2000 13:58:58 -0800 From: Bob McGowan Organization: VERITAS Software X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Christos Zoulas CC: earnie_boyd AT yahoo DOT com, Steve Kelem , Cygwin Subject: Re: pathname with spaces causes problems for tcsh References: <200003212109 DOT QAA25555 AT hrothgar DOT gw DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit I have the CD 1.0 with the same version of tcsh as the original poster. If I use double quotes around the path with spaces, there seems to be no problem. When I use a backslash to escape the spaces in the pathname, I also have no problem. But I did notice that the original poster gave the path name as /c/... and I am wondering if the problem seen relates to this. When I used the //c/dir... format to change to "Multimedia Files" and typed pwd, it printed out "/cygdrive/c/Multimedia Files" (expected) but "echo $PWD" printed "/c/Multimedia Files". This is clearly not correct. The tests I mentioned above used pathnames beginning with /cygpath/c/... When I repeated the tests using the //c... path name, the following happens: pushd "$PWD" # errors with "no such file or directory" pushd $PWD # errors with "pushd: Too many arguments." My only issue is that I cannot reproduce the setenv error mentioned in the original post, nor can I get it to "work" with $PWD when I use "cd //c/dir..." to change to the pathname with spaces. So, spaces can be a problem but once input (through some quoting mechanism), things should work, since the system now has a single null terminated string to work with. The spaces would only be problematic a second time if they were passed in such a way that the string was re-parsed by the shell as if it were a complete command line (or at least an argument list). Christos Zoulas wrote: > > On Mar 21, 12:52pm, earnie_boyd AT yahoo DOT com (Earnie Boyd) wrote: > -- Subject: Re: pathname with spaces causes problems for tcsh > > | Pathnames with spaces are a problem, period. By the time that pushd got the > | argument the backslashes had been removed and pushd passed to setenv more than > | one argument thus the complaint. > | > | You'll have to modify the source of tcsh to fix this problem. > | > | Earnie. > | > | P.S.: This problem would exist on UNIX if the directory contained spaces. > > No it would not. chdir("foo bar") works fine as well as > setenv/putenv("foo bar", "bar baz"). The problem is in the way > the interface call to the win32 setenv is implemented. > > christos > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- Bob McGowan Staff Software Quality Engineer VERITAS Software rmcgowan AT veritas DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com