This is the mail archive of the
mailing list for the Cygwin project.
RE: tcsh path conversion messed up? [was: strange shell output using tcsh under Cygwin]
- From: "Lemke, Michael ST/HZA-ZIC2" <lemkemch at schaeffler dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Tue, 7 Nov 2017 09:08:46 +0000
- Subject: RE: tcsh path conversion messed up? [was: strange shell output using tcsh under Cygwin]
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com> <firstname.lastname@example.org> <email@example.com> <d9ac360f-c14d-5bd9-b2f5-54dceefd4449@SystematicSw.ab.ca>
On Tuesday, November 07, 2017 7:12 AM Brian Inglis wrote:
>On 2017-11-06 14:59, Will Parsons wrote:
>> Will Parsons wrote:
>>> I asked about what I thought was a shell scripting problem:
>>> This doesn't look right, and would explain the strange shell output I
>>> reported. (The value of PATH under bash looks normal.) Did the installation
>>> of tcsh somehow get corrupted? I don't remember a particularly recent update
>>> to tcsh.
How are you setting path? Do you have anything in your .cshrc/.login file? Most
likely, you are doing it wrong.
>> Another bit of info - I just noticed that the value of the (t)csh shell
>> variable 'path' is:
>In csh, "PATH" is a standard Unix environment variable whose value is a colon
>separated directory list, and "path" is a shell wordlist kept synchonized with
>To list the wordlist entries with embedded spaces in csh, quote the variable
>name with the :q modifier in a foreach loop wordlist, and you get the desired
>result as easily as in your sh script [trimmed and ...s redacted]:
>.......% foreach p ( $path:q )
>foreach? echo $p
And that is also key for setting path:
set path = ( ... $path:q )
I had this bug ($path instead of $path:q) for 20 years in my init files.