Dynamic Environment Update Patch, Take One
linguist-cygwin@rich-paul.net
linguist-cygwin@rich-paul.net
Mon Apr 16 07:38:00 GMT 2001
You can find my first attempt at a patch to allow dynamic environment variable
translation in cygwin at http://www.rich-paul.net , in the left-hand column.
It's pretty easy to use: Set an environment variable called
CYGWIN_TRANSPATHS
and/or one called
CYGWIN_TRANSFILES
Those will be interpreted as semicolon separated lists of environment
variables that should be treated like HOME and PATH currently are. I use
them for things like my java CLASSPATH (much easier to manipulate in shell
scripts than it ever was in .bat files), and since my marketing dept. insists
that I code in vc++, my INCLUDE and LIB paths. Might be useful for things
like your profile dir.
Anyway, if the name is in TRANSFILES, it's like running cygpath on the thing,
and if it's in TRANSPATHS, it's like running cygpath -p on it.
One known bug: Once you've added a name to this list in a cygwin process,
all of it's children will translate this variable, even if you unset it
before starting the child. But if you unset it in explorer, and start up
a second console window, THAT window will not do the translations. You
just can't stop the inheritance once it's started. I believe that this has
to do with the fact that sometimes the environment is passed in pre-parsed,
but I"m not sure, cause it's not documented when that happens.
Happy Hacking,
Rich
--
---------------------------------------------------------------------
If this message was not digitally signed, do you really know who it
came from? Encrypt everything, let the NSA sort it out.
Unsolicited email advertisements will be proofread and returned for a fee of
500ドル per message. Sending such email to this address implies acceptance
of these terms.
-------------- next part --------------
MIME-Version: 1.0
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="----A44C5451BE220B948E16E88C66AC07BC"
This is an S/MIME signed message
------A44C5451BE220B948E16E88C66AC07BC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
You can find my first attempt at a patch to allow dynamic environment varia=
ble
translation in cygwin at http://www.rich-paul.net, in the left-hand column.
It's pretty easy to use: Set an environment variable called=20
CYGWIN_TRANSPATHS
and/or one called
CYGWIN_TRANSFILES
Those will be interpreted as semicolon separated lists of environment
variables that should be treated like HOME and PATH currently are. I use
them for things like my java CLASSPATH (much easier to manipulate in shell
scripts than it ever was in .bat files), and since my marketing dept. insis=
ts
that I code in vc++, my INCLUDE and LIB paths. Might be useful for things
like your profile dir.
Anyway, if the name is in TRANSFILES, it's like running cygpath on the thin=
g,
and if it's in TRANSPATHS, it's like running cygpath -p on it.
One known bug: Once you've added a name to this list in a cygwin process,
all of it's children will translate this variable, even if you unset it
before starting the child. But if you unset it in explorer, and start up
a second console window, THAT window will not do the translations. You
just can't stop the inheritance once it's started. I believe that this has
to do with the fact that sometimes the environment is passed in pre-parsed,
but I"m not sure, cause it's not documented when that happens.
Happy Hacking,
Rich
--=20
---------------------------------------------------------------------
If this message was not digitally signed, do you really know who it
came from? Encrypt everything, let the NSA sort it out.
Unsolicited email advertisements will be proofread and returned for a fee of
500ドル per message. Sending such email to this address implies acceptance
of these terms.
------A44C5451BE220B948E16E88C66AC07BC
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
MIIEuQYJKoZIhvcNAQcCoIIEqjCCBKYCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3
DQEHAaCCAowwggKIMIIB8aADAgECAgMEF6IwDQYJKoZIhvcNAQEEBQAwgZIxCzAJ
BgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUg
VG93bjEPMA0GA1UEChMGVGhhd3RlMR0wGwYDVQQLExRDZXJ0aWZpY2F0ZSBTZXJ2
aWNlczEoMCYGA1UEAxMfUGVyc29uYWwgRnJlZW1haWwgUlNBIDIwMDAuOC4zMDAe
Fw0wMTAyMDExOTI2MDVaFw0wMjAyMDExOTI2MDVaMEkxHzAdBgNVBAMTFlRoYXd0
ZSBGcmVlbWFpbCBNZW1iZXIxJjAkBgkqhkiG9w0BCQEWF3JpY2gtcGF1bEByaWNo
LXBhdWwubmV0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDRS7H6sh/VWqGG
Q08TgL+BWIwE0gHxGupk9faIme7Yja40XoI34vjA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