Discussion:
[ANNOUNCEMENT] Updated: mintty 2.9.5
Thomas Wolff
2018-12-05 10:14:31 UTC
Permalink
I have uploaded mintty 2.9.5 with the following changes:

Window handling
  * Fixed startup directory after cloning new window after starting
from desktop shortcut (#784, mintty/wsltty#96).
  * Avoiding stale hover indication in unfocussed window.
  * Changed default handling of resolution change to HandleDPI=2 (#824).

Tweaks to HTML clipboard/export feature
  * Flexible HTML formatting levels.
  * Configurable, also in Options dialog.
  * No more table cell container.
  * HTML escaping.
  * Apply styles individually and other tweaks for increased compatibility.
  * Font fallback 'monospace'.
  * Find relative HTML file name on Shift+"HTML Screen Dump".

Configuration
  * CopyAsHTML (#825, #811).

Other
  * Ensuring /bin in PATH for user commands.

The homepage is at http://mintty.github.io/
It also links to the issue tracker.

------
Thomas

--
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
Achim Gratz
2018-12-05 20:21:20 UTC
Permalink
Post by Thomas Wolff
Other
  * Ensuring /bin in PATH for user commands.
Blindly prepending /bin to the existing PATH is asking for trouble with
certain setups.


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

--
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
Thomas Wolff
2018-12-05 21:46:05 UTC
Permalink
Post by Thomas Wolff
Other
  * Ensuring /bin in PATH for user commands.
Blindly prepending /bin to the existing PATH is asking for trouble with certain setups.
Just to clarify, this is only applicable to user-defined commands added
to the extended context menu (option UserCommands), in order to ensure
basic tools are available. If you see problems there, please be more
specific.
Kind regards,
Thomas

--
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
Andrey Repin
2018-12-06 00:18:31 UTC
Permalink
Greetings, Thomas Wolff!
Post by Thomas Wolff
Post by Thomas Wolff
Other
  * Ensuring /bin in PATH for user commands.
Blindly prepending /bin to the existing PATH is asking for trouble with certain setups.
Just to clarify, this is only applicable to user-defined commands added
to the extended context menu (option UserCommands), in order to ensure
basic tools are available. If you see problems there, please be more
specific.
Yes, I see problem there.
I have Cygwin in my regular %PATH% at the place I want it. I.e. when using
tools and commands, I expect them to behave in a certain way.
Changing it have potential to produce unexpected results.


--
With best regards,
Andrey Repin
Thursday, December 6, 2018 3:16:03

Sorry for my terrible english...Т��Х&�&�V�&W�'G3��GG���7�wv���6���&�&�V�2��F��Фd��GG���7�wv���6���f�ФF�7V�V�FF�����GG���7�wv���6���F�72��F��ХV�7V'67&�&R��f���GG���7�wv���6������7V�7V'67&�
Thomas Wolff
2018-12-06 07:22:35 UTC
Permalink
Post by Andrey Repin
Greetings, Thomas Wolff!
Post by Thomas Wolff
Post by Thomas Wolff
Other
  * Ensuring /bin in PATH for user commands.
Blindly prepending /bin to the existing PATH is asking for trouble with certain setups.
Just to clarify, this is only applicable to user-defined commands added
to the extended context menu (option UserCommands), in order to ensure
basic tools are available. If you see problems there, please be more
specific.
Yes, I see problem there.
I have Cygwin in my regular %PATH% at the place I want it. I.e. when using
tools and commands, I expect them to behave in a certain way.
Changing it have potential to produce unexpected results.
The issue that caused me to apply this change: if you start mintty from
a desktop shortcut, cygwin /bin is not in the PATH of mintty (unless you
would set it globally in Windows, which is discouraged). It will be
inside your login shell, of course, but user commands are spawned from
mintty directly.
I could append rather than prepend /bin, but then another tool like
`sed` might be in the path and user commands behave unexpectedly. I
could also check whether it's in PATH already, and then prepend.
Thomas

--
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
cyg Simple
2018-12-06 16:25:43 UTC
Permalink
Post by Thomas Wolff
Post by Andrey Repin
Greetings, Thomas Wolff!
Post by Thomas Wolff
Post by Achim Gratz
Other
    * Ensuring /bin in PATH for user commands.
Blindly prepending /bin to the existing PATH is asking for trouble
with certain setups.
Just to clarify, this is only applicable to user-defined commands added
to the extended context menu (option UserCommands), in order to ensure
basic tools are available. If you see problems there, please be more
specific.
Yes, I see problem there.
I have Cygwin in my regular %PATH% at the place I want it. I.e. when using
tools and commands, I expect them to behave in a certain way.
Changing it have potential to produce unexpected results.
The issue that caused me to apply this change: if you start mintty from
a desktop shortcut, cygwin /bin is not in the PATH of mintty (unless you
would set it globally in Windows, which is discouraged). It will be
inside your login shell, of course, but user commands are spawned from
mintty directly.
I could append rather than prepend /bin, but then another tool like
`sed` might be in the path and user commands behave unexpectedly. I
could also check whether it's in PATH already, and then prepend.
Please make it optional. And rather than prepend doing an append might
avoid the conflicts described by Andrey.
--
cyg Simple

--
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
Achim Gratz
2018-12-06 19:39:37 UTC
Permalink
Post by Thomas Wolff
Post by Thomas Wolff
Other
  * Ensuring /bin in PATH for user commands.
Blindly prepending /bin to the existing PATH is asking for trouble with certain setups.
Just to clarify, this is only applicable to user-defined commands
added to the extended context menu (option UserCommands), in order to
ensure basic tools are available. If you see problems there, please be
more specific.
I'm not using this option, so my remark was just to remind you that
second-guessing the user w.r.t. PATH will eventually find at least one
user in an unfortunate (and in this case hard to debug) situation. So
the usual advice applies:

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.


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

--
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
Andrey Repin
2018-12-06 21:32:23 UTC
Permalink
Greetings, Achim Gratz!
Post by 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.
If anybody need a wrapper, they may write and use it by themselves.

(I already have one, written in TCC, working quite well.)
--
With best regards,
Andrey Repin
Friday, December 7, 2018 0:15:56

Sorry for my terrible english...


--
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
Thomas Wolff
2018-12-07 20:12:36 UTC
Permalink
Post by Andrey Repin
Greetings, Achim Gratz!
Post by 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.
Post by Andrey Repin
If anybody need a wrapper, they may write and use it by themselves.
(I already have one, written in TCC, working quite well.)
Out of curiosity, what's TCC and what does your wrapper do?

Thomas

--
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
Andrey Repin
2018-12-07 21:41:57 UTC
Permalink
Greetings, Thomas Wolff!
Post by Thomas Wolff
Post by Andrey Repin
Greetings, Achim Gratz!
Post by 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
yourself.
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.
Post by Thomas Wolff
Post by Andrey Repin
If anybody need a wrapper, they may write and use it by themselves.
(I already have one, written in TCC, working quite well.)
Out of curiosity, what's TCC and what does your wrapper do?
This is an augmented CMD-like scripting platform.
https://jpsoft.com/products/tcc-cmd-prompt.html

Its "runtime" variant, TCC-RT, contains only scripting core, no interactive
functionality, and is distributed for free.

I attached the pair of scripts that I use to wrap .sh/.awk/.pl/etc. with.
In manual mode, I can use it to launch any script provided /usr/bin/env can
deal with it, as it's basically a wrapper around /usr/bin/env, which ensures
that the first argument (the script name) has Cygwin notation.
The fix-path thing is necessary to tweak startup behavior. Normal operation
environment don't have /usr/local/bin in %PATH%, as that hides some
Cygwin-specific scripts which have native counterparts in a different place.

P.S.
The %[variable] notation I use is not strictly necessary.
%var or %var% works equally well, but may be disabled in options.
I'm just playing on the safe side.
--
With best regards,
Andrey Repin
Saturday, December 8, 2018 0:16:49

Sorry for my terrible english...
Brian Inglis
2018-12-07 13:45:51 UTC
Permalink
Post by Achim Gratz
Post by Thomas Wolff
Post by Thomas Wolff
Ensuring /bin in PATH for user commands.
Blindly prepending /bin to the existing PATH is asking for trouble with certain setups.
Many setups: my Windows User PATH includes Cygwin {,/usr/local}/{,s}bin and the
Windows System PATH, and my login scripts append new Cygwin paths before any
Windows paths, used to allow interop using Cygwin and Windows consoles with
Cygwin and non-Cygwin apps, which may only or also be available in MinGW/native
exes e.g. BitKeeper.
Post by Achim Gratz
Post by Thomas Wolff
Just to clarify, this is only applicable to user-defined commands
added to the extended context menu (option UserCommands), in order to
ensure basic tools are available. If you see problems there, please be
more specific.
I'm not using this option, so my remark was just to remind you that
second-guessing the user w.r.t. PATH will eventually find at least one
user in an unfortunate (and in this case hard to debug) situation. So
a) Just warn about the missing PATH component without changing the PATH.
after checking to see if the expected /bin is already present
Post by Achim Gratz
b) Give the user an option to let the command run with a separate PATH.
++
Post by Achim Gratz
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.
Maybe allow an env config file with comments, blank lines, env var definitions
with values including embedded single and double quotes, env var refs, and one
optional prefix command e.g. export, set, setenv, etc. which could be ignored
when used without a definition e.g. "export PATH" rather than "export PATH=...".
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
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
Achim Gratz
2018-12-10 18:21:17 UTC
Permalink
Post by Thomas Wolff
Tweaks to HTML clipboard/export feature
  * Flexible HTML formatting levels.
  * Configurable, also in Options dialog.
  * No more table cell container.
  * HTML escaping.
  * Apply styles individually and other tweaks for increased compatibility.
  * Font fallback 'monospace'.
  * Find relative HTML file name on Shift+"HTML Screen Dump".
Configuration
  * CopyAsHTML (#825, #811).
I could only test this today, so here is my belated confirmation that
copy&paste is working again for my use-case. Thanks!


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

--
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
Loading...