Commit Graph

32 Commits

Author SHA1 Message Date
LEE,SEUNGMIN
6bc90f727a msys2_shell: fix typo in warning (#5330)
* msys2_shell: fix typo in warning

* update checksums

---------

Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
2025-04-17 08:40:05 +02:00
مهدي شينون (Mehdi Chinoune)
d4ddcaa805 filesystem: drop clang32 2024-12-19 06:10:43 +01:00
Simon Sobisch
3d4a075d75 msys2_shell help update: add clang32 clangarm64
follow-up to 489a8aacde
2024-05-31 17:53:55 +02:00
Jorge Fabregat
7c3b9b8aab Changed --login to -l in msys_shell.cmd shell invocation to prevent csh from crashing since it does not support --login 2022-02-08 10:14:38 +01:00
Jeremy Drake
489a8aacde filesystem: add clang32 and clangarm64 icons and script support 2021-11-08 21:57:59 -08:00
Christoph Reiter
e9007a72e6 filesystem: update icons, finish support for ucrt64/clang64
Fixes #2406
2021-03-31 19:46:53 +02:00
Christoph Reiter
1072c33404 filesystem: more ucrt things 2021-03-21 17:54:35 +01:00
Miloš Komarčević
082493ae57 filesystem: use matching icon for console
Helps identifying window thumbnails when switching between MSYS and MINGW64 consoles
2020-10-09 13:35:45 +02:00
hiroakit
7476bdd9b4 Remove double quotes of the LOGINSHELL (#1868)
* Remove double quotes of the LOGINSHELL

When set shell arguments, LOGINSHELL has double quotes.
In the default, L6: set "LOGINSHELL=bash". 
I followed the format it.

* Add value to $SHELL for zsh

Issue:
1. Run, C:\msys64\msys2_shell.cmd -mingw64 -shell zsh
2. echo $SHELL
3. Nothing
2020-02-24 10:34:24 +03:00
Tanzinul Islam
1ea229850a Fix msys2_shell.cmd argument-handling with spaces (#1836)
* Fix msys2_shell.cmd argument-handling with spaces

Commit 11ba641bed intended to preserve [`cmd.exe` delimiter characters](https://ss64.com/nt/syntax-esc.html#delimiters) in the command line passed on to `bash`, but broke the handling of `-where` directories with spaces in them. Fix this by:

 - Incrementing `shiftCounter` with any quoted arguments treated as separate words, because the `FOR /F ... IN`-loop at the end cannot treat them (in the full command) as single parameters.
 - Using the full list of `cmd.exe` delimiters in the `FOR /F ... IN`-loop when skipping the initial tokens.

Tested this with:

```
C:\msys2\msys2_shell.cmd -defterm -no-start -mingw64 -where <DIR> -shell bash -c $@ -- echo hello there, --world=windows
```

where `<DIR>` is the following:

 - C:\Users
 - C:\Progra~1
 - "C:\Program Files"
 - "C:\Program Files (x86)"
 - "C:\Users\T-17\Documents\Projects and Learning\test,dir"

Fixes #1826

* Clean up `FOR /F ... IN`-command

* Clean up working variables

* Adhere to lowercase CALL convention

* Prefix working variables with `msys2_` to prevent collisions with user-defined variables

* Don't clobber quotes and parentheses in final Bash command line

* Prevent warning trace on no arguments

* Handle cmd.exe metacharacters (e.g. parentheses) in Bash command line
2020-02-06 08:05:49 +03:00
Tanzinul Islam
11ba641bed msys2_shell.cmd: Avoid argument splitting by cmd.exe (#1795)
Consider this inline invocation in a Windows Command Prompt:

```
C:\msys2\msys2_shell.cmd -defterm -no-start -mingw64 -here -c $@ -- echo hello there, --world=windows
```

This currently produces:

>hello there, --world windows

Note the absence of the `=` character. This is due to the word-splitting done by `cmd.exe` to form the positional parameters (`%1` - `%9`). The same word-splitting is not done on the `%*` special variable, so derive the remaining command line arguments.

With this fix, the above command produces:

>hello there, --world=windows
2020-01-13 07:46:14 +03:00
pchemguy
45151d01c6 Add support for more than 9 shell command line arguments
Adds a loop collecting all command line arguments remaining after msys2_shell.cmd processing
2018-05-29 15:24:56 +03:00
jmd
ab784fea52 filesystem: Add -shell parameter to msys2_shell.cmd
Allow setting the login shell via command line parameter.  e.g,

    msys2_shell -shell fish -mintty
2018-02-19 21:30:00 -08:00
Niklas Holm
b3da2d9a8e Revert "Fix issue #1107"
This reverts commit fb4ed54980.
2018-02-14 15:19:53 +01:00
Niklas Holm
fb4ed54980 Fix issue #1107
- Only cd to $HOME when started from msys2_shell.cmd
2018-02-13 19:09:05 +01:00
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
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
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
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
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