cygwin.rst
changeset 2335 df944b944b30
parent 2320 b7a2c43902f3
child 2336 4cd18bed8bac
--- a/cygwin.rst	Thu Jan 03 22:13:18 2019 +0200
+++ b/cygwin.rst	Tue Jan 08 00:32:34 2019 +0200
@@ -6,38 +6,42 @@
 .. contents::
    :local:
 
-Installation.
+Configuration
 =============
 
-Run setup.exe. Use output dir like::
-
-  d:\opt\cygwin
+Run ``setup.exe``. Today you should prefer 64-bit flavor because it sould less BLODA. Add Cygwin
+``/bin`` directory to your ``PATH`` env var::
 
-Add to your PATH env var exactly before C:\WINDOWS\system32;C:\WINDOWS values::
+  set PATH=c:\opt\cygwin\bin;%PATH%
 
-  set PATH=d:\opt\cygwin\bin;d:\opt\cygwin\usr\local\bin;%PATH%
+Cygwin behavior can be altered via ``CYGWIN`` env var::
+
+  set CYGWIN=nodosfilewarning noglob
 
-  REM Set CYGWIN variable to 'nontsec'. That makes sure that permissions
-  REM on your windows machine are not updated as a side effect of cygwin
-  REM operations.
-  set CYGWIN=binary nontsec nodosfilewarning codepage:cp1251 noglob
+Currently only ``noglob`` is useful. It disables interpreting special shell wildcard characters
+passed verbatim from native Windows apps. So you will unable to do ``ls *`` from ``cmd.exe``. But
+without this option (``glob`` is default) Mercurial patterns, like ``{rev}`` are broken. For me
+native Windows Emacs can't determine file revision with my ``hg`` wrapper.
 
-  set LANG=ru_RU.cp1251
+https://cygwin.com/cygwin-ug-net/using-cygwinenv.html
+  The CYGWIN environment variable. Available options.
 
-Set HOME env var (where places config file and projects)::
+Set ``HOME`` env var::
+
+  set HOME=c:\home
 
-  set HOME=d:\home
+https://stackoverflow.com/questions/1494658/how-can-i-change-my-cygwin-home-folder-after-installation
+  How can I change my Cygwin home folder after installation?
 
-Set TMP and TEMP env vars with good path (without spaces, etc.; these vars
-already set as used defined, so you need change their values)::
+Set ``TMP`` and ``TEMP`` env vars without dangerous symbols in path (without spaces, etc)::
 
   set TMP=c:\tmp
   set TEMP=c:\tmp
 
-Also you need edit ``/etc/passwd`` to point to correct home path.
+Also you need to edit ``/etc/passwd`` to point to correct home path.
 
-Starting from Cygwin ``/etc/nsswitch.conf`` settings used to define user home.
-By default it is ``/home/%U`` so it is better to create symlink::
+For Cygwin 1.7 ``/etc/nsswitch.conf`` settings is used to define user home. By default it is
+``/home/%U`` so it is better to create symlink::
 
   $ ln -s /cygdrive/d/home /home/user
 
@@ -53,8 +57,12 @@
 
   /etc/setup/installed.db
 
-https://stackoverflow.com/questions/1494658/how-can-i-change-my-cygwin-home-folder-after-installation
-  How can I change my Cygwin home folder after installation?
+In a past I work with particular code point::
+
+  set LANG=ru_RU.cp1251
+
+Altering ``LANG`` for anything other then ``C`` cause only problems, when you get help and error
+messages in non-English. It is mostlry impossible to search for keywords, when text are translated.
 
 Documentation
 =============