Commit Graph

77 Commits

Author SHA1 Message Date
Shea Parkes
7ca94b0abd Correct spelling in msys2_shell.cmd
Do this so the help docs are clearer.
2017-11-20 21:31:23 -05:00
Evgeny Grin (karlson2k)
677a01138d msys2_shell.cmd: added option for executing command and returning result to batch caller 2017-05-03 21:00:10 +03:00
Evgeny Grin (karlson2k)
c21d3c018f msys2_shell.cmd: use "title" directly with mintty 2017-05-03 18:56:14 +03:00
Evgeny Grin (karlson2k)
1aa446ea7e msys2_shell.cmd: removed unused Console2 options 2017-05-03 18:46:20 +03:00
Алексей
8a2863f5f3 Revert "Taskbar-pinnable mintty" 2017-04-14 07:52:21 +03:00
Mihail Konev
59bd390b5e filesystem: add terminal cwd sequence to PS1 2017-03-05 22:07:26 +05:00
Alethea Rose
bf0c061f17 Also source /etc/profile.d/*.sh for zsh 2017-02-13 22:06:22 -05:00
David Macek
9e1d71b9bd filesystem: Remove the transitional post-install message about removing old .bat files 2017-02-05 12:45:32 +01:00
David Macek
74f9468ce4 filesystem: Fix case when getent isn't installed 2017-01-31 09:25:55 +01:00
David Macek
ae10fd86dd filesystem: Vary the prompt between regular '$' and bold '#'
Show '#' only if we can detect that the current process is
elevated.  It requires `group: db` enabled in /etc/nsswitch.conf.
2017-01-29 12:41:09 +01:00
Karlson2k
9f39c75117 filesystem: bump version and update checksums 2016-07-16 22:18:25 +03:00
Karlson2k
648db9106c msys2_shell.cmd: fixed processing specified working directory 2016-07-16 22:15:10 +03:00
Karlson2k
9f7a93a620 msys2_shell.cmd: print help if asked by '--help', '-?' or '/?' parameters
This simplify usage for people who are used to the MS or GNU standards.
2016-07-16 19:20:44 +03:00
Karlson2k
705a468108 msys2_shell.cmd: Fixed return value - printing help is not an error. 2016-07-16 19:11:50 +03:00
Karlson2k
222dd3a2ef msys2_shell.cmd: Improved help display 2016-07-16 19:08:44 +03:00
Karlson2k
f777b848dc msys2_shell.cmd: Fixed running with ConsoleZ.
'start' command like to use first quoted parameter as title.
2016-07-16 19:08:34 +03:00
Karlson2k
ae96deba82 msys2_shell.cmd: Fixed running with conemu if path (for any strange reason) has spaces 2016-07-16 19:08:27 +03:00
Karlson2k
1942ce3fcd msys2_shell.cmd: Stop deprecating parameters, give users freedom to use whatever they found convenient 2016-07-16 19:08:17 +03:00
Karlson2k
73e06b9d4c bash.bashrc: Update PS1 if PS1 wasn't exported.
Closes #653
2016-07-14 23:59:51 +03:00
Philip Oakley
17a6004301 bashrc: re-include $PS1 priority
6e6310d (filesystem: New specific variable MSYS2_PS1., 2016-05-01)
introduced the MSYS2_PS1 prompt script priority to allow multiple
device configurations.

Unfortunately, if MSYS2_PS1 was not set it overwrote the $PS1, even
when specifically set by the users configuration, such as provided in the
Git-for-Windows SDK (see https://github.com/git-for-windows/git/issues/794#issuecomment-227401839)
and the monkey patch fix (https://github.com/git-for-windows/build-extra/pull/122).

Introduce a priority order so that the user's $PS1 (if set) has an
intermediate priority between the MSYS2_PS1 and the default PS1.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
2016-07-06 23:33:58 +01:00
Алексей
bc18852c8e Merge pull request #635 from Karlson2k/config_site_01
Added support for 'config.site' files
2016-06-30 08:55:04 +04:00
Renato Silva
4c63570212 filesystem: Some improvements.
* Avoid continuously appending items to MANPATH and INFOPATH when
  sourcing /etc/profile multiple times.

* Check for .bashrc existence in shell manager.
2016-06-26 15:46:53 -03:00
Karlson2k
84555bb798 Added support for 'config.site' files
Now users don't need to override installation prefix for MinGW programs and
'configure' scripts use more compatible triplet 'x86_64-w64-mingw32`
automatically instead of 'x86_64-pc-mingw64`.
2016-06-21 03:03:24 +03:00
Renato Silva
f3d69450f2 filesystem: Restore removed parameters as deprecated in shell starter. 2016-05-30 13:08:15 -03:00
Renato Silva
7aa258ac7b filesystem: Some improvements.
* Improve shell manager to run existing executable files provided as
  first argument, instead of opening them with Windows Explorer.

* Add simplified parameter -here to shell starter, making the directory
  argument optional and deprecating the -where parameter.

* Add -help parameter to shell starter.
2016-05-24 14:37:08 -03:00
Renato Silva
f64a34a763 filesystem: More consistent behavior for MSYSTEM.
MSYSTEM now defaults to MSYS when not specified, and there is no
different behavior anymore between empty value and MSYS, for example
/opt/bin was not being added to path when not setting MSYSTEM. This
removes the need for explicitly setting the variable, since a default
value is now implied.
2016-05-24 14:37:08 -03:00
Renato Silva
d81601b726 More environment improvements.
* Warning about required shortcut changes.
  When upgrading the filesystem package, user will be notified about the
  unified msys2_shell.cmd and asked for updating their shortcuts.

* New warning mechanism for interactive bash sessions.
  Applications can now add warnings to the terminal for notifying the
  user about possible problems. This is done by adding a file containing
  the warning text to one of the following locations:

      - /etc/profile.d/NAME.warning
      - /mingw32/etc/profile.d/NAME.warning
      - /mingw64/etc/profile.d/NAME.warning

  These files are processed by /etc/bash.bashrc. Files with the
  "warning.once" extension are removed after processing. An
  implementation example is provided by next change.

* Add simplified parameter -full-path to msys2_shell.cmd. The old
  parameter -use-full-path still works for now but is marked as
  deprecated using the above warning mechanism.

* Add file opening support to shell manager.
  Both directory and file arguments are now accepted and passed to
  Windows Explorer for opening with default application.

* Residual pkgrel updates.
2016-05-24 14:37:08 -03:00
Renato Silva
6da50f5a66 filesystem: Improvements for shell manager.
* Use winpty for all commands from the Windows system32 directory.
* Run Windows Explorer instances when provided with directory arguments.
2016-05-24 14:37:08 -03:00
Renato Silva
dc9fe79413 filesystem: Fixes for the shell starting script.
* Fix default value for MSYSTEM.
  This was being determined based on relative paths to /mingw64 and
  /mingw32. Since these directories are provided by filesystem, it
  would always default to MINGW64, and only under such relative path
  condition. MSYSTEM now defaults to MSYS when not specified.

* Remove the ambiguous parameters -mingw and -msys2.
  For the same reason above, and for avoiding confusion since MINGW
  shells are also "MSYS2 shells", respectively.
2016-05-24 14:37:08 -03:00
Renato Silva
6e6310dd66 filesystem: New specific variable MSYS2_PS1.
Setting this variable now makes /etc/bash.bashrc use that as PS1 instead
of default value. This allows for configuration shared between MSYS2 and
other environments like Cygwin or MinGW.org MSYS to define a PS1 that is
specific to MSYS2 without manual detection of the system type.
2016-05-24 14:37:08 -03:00
Renato Silva
f102f8cf58 filesystem: Improve the shell script.
This script can now also be used for executing commands with custom
handling for better MSYS2 integration. The following commands are
currently supported and more can be added:

    * Windows Explorer, for proper backslash path conversion.
    * Windows command prompt, for properly executing under winpty.
    * Programs under /mingw32 and /mingw64, for the same reason.
2016-05-24 14:37:08 -03:00
Renato Silva
2c4e6d7289 Rename start_shell.cmd to msys2_shell.cmd.
This more specific name improves MSYS2 detection by applications that
are sensitive to the presence of this file, such as the installer script
make-msys2-installer.bat.
2016-05-24 14:37:08 -03:00
Renato Silva
8a94387746 Remove unneeded shell starting wrappers.
These batch files used to contain duplicated code that has been merged
into start_shell.cmd. Shortcuts can replace them like this:

    * Call `start_shell.cmd -mingw32` instead of mingw32_shell.bat.
    * Call `start_shell.cmd -mingw64` instead of mingw64_shell.bat.
    * Call `start_shell.cmd -msys` instead of msys2_shell.bat.
2016-05-24 14:37:08 -03:00
Renato Silva
b827a678b1 Some environment improvements.
* New script /etc/msystem providing information associated with the
  current MSYSTEM. This is sourced by /etc/profile but can be used by
  non-login scripts for getting information such as the current
  compiler architecture or mount point.

* New script /usr/bin/shell for switching between shells without
  restarting MSYS2. This can be used in interactive sessions but also
  from shell scripts for switching the MSYSTEM without restarting bash
  or spawning a subshell.

* Allow /etc/profile to be sourced multiple times without continuously
  appending stuff to PATH or losing track of the original Windows TEMP.
  Also implemented for /etc/profile.d/perlbin.sh, so perl path is not
  repeatedly appended.
2016-05-24 14:37:08 -03:00
David Macek
8f4825e69e filesystem: Update version and checksums after last merge 2016-05-03 10:49:33 +02:00
ph4nt0m
2a4d208b96 filesystem: Add -where parameter to start_shell.cmd
* Introduce parameter '-where' which must be followed by an existing
  directory which will be used to start the shell in (use . for the
  current working directory)
* Use setlocal to return to the original directory after this script
  finished (any calls to cd will be local to this script)
2016-05-03 09:18:56 +02:00
Renato Silva
7fd131dde0 filesystem: More consistent Windows path setting.
The generic variable SET_FULL_PATH has been replaced with MSYS2_PATH_TYPE, which
can accept the following values:

* strict: no Windows path.
* inherit: full Windows path.
* Other values: minimal Windows path (default).
2016-04-08 16:05:50 -03:00
Karlson2k
b47e084f17 .bat-files: added support for ConEmu terminal emulation 2016-04-05 17:24:47 +03:00
Karlson2k
bad73771f3 .bat-files: add '-use-full-path' parameter support.
It's convenient to use this parameter in shortcut rather than modify bat-file with
changes than will be lost on next update.
2016-04-05 14:36:26 +03:00
Karlson2k
7b3055f9d7 .bat-files: move duplicated code to separate file 2016-04-05 14:28:27 +03:00
Karlson2k
a7b0cf62a6 .bat files: improve working directory handling 2016-04-05 11:54:52 +03:00
Karlson2k
dda225a27b Set MSYSCON to mintty only when mintty is really used 2016-04-05 11:44:51 +03:00
Karlson2k
c17fba192f Update sha256sums, missing in previous commits. 2016-04-05 11:43:29 +03:00
Karlson2k
caa9db4fef Fix handling quoted parameters, fix handling '-mintty' parameter
Shift command don't change value of %* so numbered parameters are required.
2016-04-04 21:02:30 +03:00
Alexpux
113d7c0de1 Merge pull request #531 from Karlson2k/bat_files_02
.bat-files: exit only from .bat file instead of terminating parent command processor
2016-04-04 20:40:42 +04:00
Karlson2k
0fa627dda8 .bat-files: exit only from .bat file instead of terminating parent command processor,
bypass result of "start" to calling process
2016-04-04 18:56:12 +03:00
Karlson2k
279c912b41 Remove Win9x support from .bat files 2016-04-04 18:33:53 +03:00
Alexey Pavlov
8db3812e08 filesystem: Fix path convert. Remove TERM variable 2016-03-30 16:08:19 +03:00
Alexey Pavlov
5abf4b608f filesystem: Add environment variable to SKIP minimize PATH 2016-03-30 08:29:49 +03:00
pavelp
41361633f1 filesystem: handle ctrl+[right/left] for word forward/backward in mintty 2016-03-29 22:55:58 -04:00