From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:100]) by sourceware.org (Postfix) with ESMTPS id 99DFC3861004 for ; Sat, 21 Nov 2020 10:05:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 99DFC3861004 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=anrdaemon@yandex.ru Received: from mxback9o.mail.yandex.net (mxback9o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::23]) by forward100p.mail.yandex.net (Yandex) with ESMTP id CAD255980929; Sat, 21 Nov 2020 13:05:00 +0300 (MSK) Received: from iva3-dd2bb2ff2b5f.qloud-c.yandex.net (iva3-dd2bb2ff2b5f.qloud-c.yandex.net [2a02:6b8:c0c:7611:0:640:dd2b:b2ff]) by mxback9o.mail.yandex.net (mxback/Yandex) with ESMTP id jf8l1hcaI8-50DOaOqb; Sat, 21 Nov 2020 13:05:00 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1605953100; bh=3oFO3Dj3VIQieMW7l1Dr8mXUXO725YIFXF/2RDamrpA=; h=In-Reply-To:Subject:To:Reply-To:From:Message-ID:References:Date; b=a4BwKaheW+O3EkdSbTgUVNvzJuwE6Tm00i9N7MMY8cYNqI50NoRf6c4/l988o2zZ6 8TCD/v3Z3+ddDc0+eDjEgyywCt6cSs4laHWJX6l2NqVhTVcLqEnb8KxCdiVsvV1Ye/ Jkoz/RLqHQSRmqCc3gST9ahGRaP0lZ8n8UdV5mYk= Authentication-Results: mxback9o.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by iva3-dd2bb2ff2b5f.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id MTdBw0xSXW-50IaQe2G; Sat, 21 Nov 2020 13:05:00 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Sat, 21 Nov 2020 09:53:02 -0000 Date: Sat, 21 Nov 2020 12:53:01 +0300 From: Andrey Repin X-Mailer: The Bat! (v6.8.8) Home Reply-To: cygwin@cygwin.com X-Priority: 3 (Normal) Message-ID: <1229487813.20201121125301@yandex.ru> To: Jason Vas Dias , cygwin@cygwin.com Subject: Re: BUG: command invocation misinterpreted as variable setting, SOMETIMES. In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Nov 2020 10:05:05 -0000 Greetings, Jason Vas Dias! > I am a complete novice Windows user, I have used only BSD / Solaris > / AIX / HP-UX / MacOSX / z/OS or Linux since 1990, so I am an advanced UNIX > shell script user & C/C++ + LISP + PERL programmer (I prefer LISP nowadays). > I have to run a script with an alternate setting of $HOME, so I do: > $ HOME="C:\\USERS\\JVD\\" sbcl --script "C:\\${path-to-my-script}.lisp" You should use Cygwin (POSIX) style paths here. (assuming sbcl is a Cygwin program) Also, trailing path separator is unnecessary, if not confusing. > This works, but now: > $ cd ~ > -bash: cd: "C:\\USERS\\JVD\\" sbcl --script > "C:\\${path-to-my-script}.lisp": No such file or directory > $ echo $HOME > /home/JVD > This is very weird! "$HOME" is still set to its /etc/bash.bashrc set > default, but evaluation of 'echo ~', which I thought should be > equivalent to 'echo $HOME', yields the last command to be prefixed > by a command-specific HOME=... setting . The first thing in debugging is to understand that computers are essentially stupid. They do exactly what you ask them to. > I think this is a bug. Since setting HOME=... has no effect now, > (it still has its correct value), > use of '~' is now effectively disabled for this shell session . > What is 'echo ~' doing other than 'echo $HOME' ? Nothing, I'm unable to reproduce your behavior. > This is a serious bug to me. I also have some unanswerable questions niggles: > > ( where ${path-to-my-script} is the actual name of my script file, not > an env var. > SBCL is the Windows build of Steel Bank Common Lisp, installed under > "C:\\Program\ Files\\", which does not use the Cygwin libraries, Then you are doing it wrong. Cygwin is not supposed to understand Windows paths, although in many cases it does. > and accepts Windows style paths as 'native-namestring's , while > converting pathnames to the 'c:/x/y/z' form with 'namestring'. These are same paths, Windows don't see a difference between \ and / as path separators. Since DOS 3.3 at least. > Incidentally, can anyone enlighten me as to why a Windows path > cannot be specified like: "C:\\Program\ Files\ \(x86\)\\" and > used successfully in Cygwin ? It could, in a small set of cases. However, in general it's not supposed to, see above. > Or why a path like that must be specified like: > /cygdrive/c/Program\ Files\ \(x86\)/... > on the command line to work in bash completion, but must be specified like: > /cygdrive/c/Program Files (x86)/... > to work in $PATH ? It would be nice to have some consistency here, > so that scriptlets like the commented out section will work: This: > Problem reports: https://cygwin.com/problems.html > FAQ: https://cygwin.com/faq/ > Documentation: https://cygwin.com/docs.html > Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple > Since I am running Windows under a Linux VM, solutions like > MSYS2 or Windows Services for Linux (WSL), which seem to > require one to install a complete Linux distribution under > Windows, are overkill / sledgehammer approaches for me - > I don't have the diskspace . Windows & Cygwin installed in only 16GB, > but Visual Studio consumes @ 50GB, and that's enough Windows > binaries for me ! MSYS2 is a Cygwin spin-off, not a "complete linux distribution". > Any advice gratefully received. You have a choice between using Cygwin-provided clisp (An ANSI Common LISP implementation), building LISP of your choice under Cygwin, dealing with path differencies on your own or not using Cygwin. Depends, what you are using Cygwin for. From the sound of it, you don't need Cygwin at all to begin with. -- With best regards, Andrey Repin Saturday, November 21, 2020 12:22:45 Sorry for my terrible english...