| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-ID: | <406C6B13.3070401@scytek.de> |
| Date: | Thu, 01 Apr 2004 14:18:43 -0500 |
| From: | Volker Quetschke <quetschke AT scytek DOT de> |
| User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Is !C: a valid environment variable? |
| X-Enigmail-Version: | 0.82.6.0 |
| X-Enigmail-Supports: | pgp-inline, pgp-mime |
| X-Scanned-By: | MIMEDefang 2.39 |
| X-IsSubscribed: | yes |
--------------enig0E27D25AD7137772BD187C61
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi!
If you start bash from a command prompt, e.g. by starting the
cygwin.bat you get funny environment variables:
bash-2.05b$ set | grep \!
!C:='C:\cygwin\bin'
When you exit bash and start it again from the same shell you can
even get:
bash-2.05b$ set | grep \!
!C:='C:\cygwin\bin'
!EXITCODE=00000000
But try to echo any of these, or define one with !.
bash-2.05b$ export !HELLO=hello
bash: !HELLO=hello: event not found
I think this special treatment is a bug, what is the prefered solution?
The special treatment is done in environ.cc:
/* Current directory information is recorded as variables of the
form "=X:=X:\foo\bar; these must be changed into something legal
(we could just ignore them but maybe an application will
eventually want to use them). */
I'm asking because I have a programm that chokes on !<something>
environment variables, and he workaround I'm using is always starting
the shell via: C:\cygwin\bin\rxvt.exe -e /usr/bin/bash --login -i
from the desktop or logoing into that machine via ssh.
Volker
--
PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net
key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D
--------------enig0E27D25AD7137772BD187C61
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAbGsTPTXJup+KeF0RAuJ/AJ9lZ8Uhdt67BFOHYJ1eOisbzi+NlQCgkroU
RL9b0SHSRzDz8PC7Utrh6Eg=
=NDvg
-----END PGP SIGNATURE-----
--------------enig0E27D25AD7137772BD187C61--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |