X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:references :in-reply-to:content-type:content-transfer-encoding :mime-version; q=dns; s=default; b=u741cvGrTTz/ne8cx3mklqPPQb0Ia 3P6UdWIcKrxSd3A3Md0wDuJ9h38TwLlfN1NWtOhB2Rk3ZVgHdDwr6LTo8oUPmUa3 AENvt+oeX2QjFsN52t5olhbUet4s4EvCxZMYRpRwMrHeYYTQbb1ldpwBYzn4Nd9v xDGq6PrqP+FZ/s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:references :in-reply-to:content-type:content-transfer-encoding :mime-version; s=default; bh=ReqEQy+XjFoB+VKBCLNkcn3ZSvg=; b=maE 7BkXKtgf5q0ma2sbyDRlLK1x0h7ef5YyHYzhP9csFNarws/ucxYuCAxrSz5+JXwT tTuwgEbqZ5+pI+qP8Je+t/m6c+xJ/ppDx59nstduyrDHKd55mPiO1S+T3PkkNT3V V6W80aNsR7taSQnTRYaiVBEMWFw475aBMtRBsjqc= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_50,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=william, bazaar, Parsons, parsons X-HELO: cluster-j.mailcontrol.com From: "Lemke, Michael ST/HZA-ZIC2" To: "cygwin AT cygwin DOT com" Subject: RE: tcsh path conversion messed up? [was: strange shell output using tcsh under Cygwin] Date: Tue, 7 Nov 2017 09:08:46 +0000 Message-ID: <8ef62c62e13846dd80c1ba65397b8a67@DE013666.schaeffler.com> References: In-Reply-To: x-ms-exchange-transport-fromentityheader: Hosted Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id vA7997rQ011563 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: >>> PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/c/Windows/system32:/c/Windows:/c/Windows/system32/wbem:/c/ProgramData/Oracle/Java/javapath:/c/Program:Files/Common:Files/Microsoft:Shared/Windows:Live:/c/Program:Files:(x86)/Common:Files/Microsoft:Shared/Windows:Live:/c/Program:Files/Dell/DW:WLAN:Card:/c/Program:Files:(x86)/Intel/iCLS:Client:/c/Program:Files/Intel/iCLS:Client:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program:Files/WIDCOMM/Bluetooth:Software:/c/Program:Files/WIDCOMM/Bluetooth:Software/syswow64:/c/Program:Files:(x86)/Windows:Live/Shared:/c/Program:Files:(x86)/Bazaar:/c/Program:Files:(x86)/QuickTime/QTSystem:/c/cygwin/home/william/bin:/c/ezwinports/bin:/c/Program:Files:(x86)/PuTTY:/usr/lib/lapack >>> >>> 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 >"PATH". >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 >foreach? end 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. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple