From cf1a24cc862088d2ee8b69faab2858c92db207bb Mon Sep 17 00:00:00 2001 From: David Macek Date: Thu, 18 Jun 2020 19:14:41 +0200 Subject: [PATCH] README: Explain environment configuration a bit better --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8286dab..47fe1c2 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,25 @@ MSYS2 launcher ============== -A helper for launching MSYS2 shells. Features blink-less launching and correct taskbar/start pinning. +A helper for launching MSYS2 shells. Features blink-less launching and correct taskbar/start pinning. Installation ------------ -Just `make` and put the .exe and .ini files inside your MSYS2 root. Needs mintty v2.1.6 or newer. +Just `make` and put the .exe and .ini files inside your MSYS2 root. Needs mintty v2.1.6 or newer. Configuration ------------- -All three default launchers are the same (except for embedded icons and descriptions) and are configured by corresponding .ini files. The .ini file has to be in the same directory as the .exe file and have the same filename (except for the `.exe` -> `.ini` change). +All three default launchers are the same (except for embedded icons and descriptions) and are configured by corresponding .ini files. The .ini file has to be in the same directory as the .exe file and have the same filename (except for the `.exe` -> `.ini` change). -By default, only `MSYSTEM` is set, but options for inheriting `PATH` and tweaking `MSYS` are prepared, as well as `CHERE_INVOKING` for the shell to stay in the current working directory (instead of changing to the home directory). +The .ini file contains environment variables, each on a separate line, in the usual `VAR=val` format. Lines starting with `#` are ignored. The values are expanded using the current environment (use Windows `%var%` syntax), evaluated from top to bottom. By default, only `MSYSTEM` is set and the rest is inherited from the outside environment, but some common options are prepared and commented out in the files: -The .ini file contains environment variables, each on a separate line, in the usual `VAR=val` format. Lines starting with `#` are ignored. The values are expanded using the current environment (use Windows `%var%` syntax). +- `MSYS=...`: configures runtime behavior +- `CHERE_INVOKING=1`: prevent the login scripts from changing the working directory to the user's home directory +- `MSYS2_PATH_TYPE=strict|minimal|inherit`: configures how the login scripts set up `PATH` Pinning ------- -As with many other applications, the correct way to pin a shortcut to the taskbar is by right-clicking the button of a running MSYS2 shell (started by this launcher) on the taskbar and choosing "Pin this program to taskbar". Pinning the `.exe` file itself won't create the shortcut correctly. There are tools to diagnose and fix such a situation (7+ Taskbar Tweaker and Win7AppId) in case re-pinning is not preferred. +As with many other applications, the correct way to pin a shortcut to the taskbar is by right-clicking the button of a running MSYS2 shell (started by this launcher) on the taskbar and choosing "Pin this program to taskbar". Pinning the `.exe` file itself won't create the shortcut correctly. There are tools to diagnose and fix such a situation (7+ Taskbar Tweaker and Win7AppId) in case re-pinning is not preferred.