Web lists-archives.com

Re: [ANNOUNCEMENT] Updated: mintty 2.9.5

Am 10.12.2018 um 03:01 schrieb Andrey Repin:
Greetings, Thomas Wolff!

Am 07.12.2018 um 22:41 schrieb Andrey Repin:
Greetings, Thomas Wolff!

Am 06.12.2018 um 22:32 schrieb Andrey Repin:
Greetings, Achim Gratz!

a) Just warn about the missing PATH component without changing the PATH.
b) Give the user an option to let the command run with a separate PATH.
Indeed there might be other things that are missing in the environment,
so instead of just fixing up PATH you might consider using a wrapper
that the user can change.
This is an interesting point.
Probably letting the user specify custom $PATH for quick commands (and save
current %PATH% as $ORIGINAL_PATH) may be the best choice.
The default can be %Cygwin%\bin:%PATH% or %PATH%:%Cygwin%\bin, I'm not very
concerned as long as it's explicit and customizable.
I didn't expect the setup of this specific feature to be so strongly
advocated :)
In any case, things shouldn't become too complex. What I can image is an
option UserCommandsPATH
with one optional placeholder %s which would be replaced with the
environment PATH;
default /bin:%s, corresponding to current behaviour.
Using native paths and environment variable syntax, you can always use
ExpandEnvironmentString to get the %PATH% you need.
Cygwin DLL will then convert it to own version, avoiding you mangling it
And I would strongly discourage from using placeholders familiar for you, but
unexpected by the end user and taken from entirely different area of knowledge.

BTW, Cygwin itself does it differently. %Cygwin%\bin is converted to /usr/bin.
This setup should be handled in the Posix path domain.
Give me a good reason why should you second-guess Cygwin's own functionality?
You have apparently set up some cmd scripts as mintty user commands, so you're thinking in Windows terms here. However, the idea is more to use cygwin tools for such purposes. In either case, the path is handled within a cygwin session (mintty) and cygwin does the conversion both ways, so it should be fine for you.

I've uploaded a
patch for evaluation, to the github repository.

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