msys2 / msys2/msys2.github.io

/usr/bin/start shell script should be replaced with a native windows executable

Open
#344 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
3.3k
Forks
446
Avg merge
2h 16m
Merged PRs (30d)
1

Description

/usr/bin/start has this line:

cmd //c start "${@//&/^&}"

The double slash prevents conversion of /c into C:\, instead it's converted to /c with a single slash. I couldn't find this info at https://www.msys2.org/docs/filesystem-paths/ though.

I expect that this tool will accept the command line arguments, perform the needed path conversions and launch cmd /c start ...

However, MSYS2_ARG_CONV_EXCL=* or MSYS2_ARG_CONV_EXCL=// affect both the actual arguments and //c. This variable should only affect the actual arguments and I see only one way to do that: replace the script with a native windows executable. Then MSYS2 will pass some command line to that executable with already converted paths and it can run cmd /c without a problem.

I personally do export MSYS2_ARG_CONV_EXCL='*' in my "git for windows" installation and this breaks git help: starts an interactive cmd prompt instead of launching the browser.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading /usr/bin/start and the issue's description of MSYS2_ARG_CONV_EXCL, then verify how //c and user arguments are converted. Done means a native Windows executable accepts the arguments, preserves the intended path conversion behavior, invokes cmd /c start, and no longer breaks git help when exclusion is set.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli, operating-systems, tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.