Skip to content

docs: avoid MINGW64/Git Bash slash interpretation - #2475

Merged
abetomo merged 1 commit into
tj:developfrom
taronsung:docs/mingw64-slash-warning
Feb 3, 2026
Merged

abetomo merged 1 commit into
tj:developfrom
taronsung:docs/mingw64-slash-warning

Conversation

@taronsung

Copy link
Copy Markdown
Contributor

Summary

Add documentation warning about forward slash (/) argument expansion in Git Bash (MINGW64) on Windows.

Closes #2380

Changes

  • Added new section "Windows MINGW64 / Git Bash" to both English and Chinese READMEs
  • Documents the MSYS2 path conversion behavior that affects slash arguments
  • Provides practical workarounds for users encountering this issue

Workarounds Documented

  1. Use a different character instead of /
  2. Double the slash: --separator //
  3. Set MSYS_NO_PATHCONV environment variable
  4. Quote with leading slash: --separator '///'

References

@shadowspawn

Copy link
Copy Markdown
Collaborator

This is tidy, but there has only ever been one issue about / in MINGW64 and I feel documenting the behaviour is a problem for that shell rather than for Commander.

Since the problem came up because a Commander example uses / in a parameter (my fault!), I thought reworking the "split" example to use a different character would avoid the problem.

Is that something you would like to do? I think a dash (-) should be ok because Commander allows that as a parameter, but an underscore would be very safe too.

Changed example separator from '/' to '-' in split.js, string-util.js,
and both English and Chinese READMEs. This avoids path expansion issues
on MINGW64/Git Bash where '/a/b/c' gets converted to Windows paths.
@taronsung
taronsung force-pushed the docs/mingw64-slash-warning branch from 3a27a06 to d1f3cca Compare February 2, 2026 05:25
@taronsung

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion! I've updated the examples to use - instead of / as the separator character. This avoids the MINGW64 path expansion issue entirely rather than documenting the workaround.

Changes made:

  • examples/split.js: Changed comments to use -s - a-b-c
  • examples/string-util.js: Changed to --separator=- a-b-c
  • Readme.md: Updated corresponding example outputs
  • Readme_zh-CN.md: Updated Chinese README with same changes

@shadowspawn shadowspawn changed the title docs: add MINGW64/Git Bash slash interpretation warning docs: avoid MINGW64/Git Bash slash interpretation Feb 2, 2026
@shadowspawn
shadowspawn changed the base branch from master to develop February 2, 2026 23:11

@shadowspawn shadowspawn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks @taronsung

@abetomo abetomo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@abetomo
abetomo merged commit 30e6b8c into tj:develop Feb 3, 2026
@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Feb 3, 2026
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label May 29, 2026
@shadowspawn

Copy link
Copy Markdown
Collaborator

huskas-2189 pushed a commit to huskas-2189/Bookmark that referenced this pull request Jun 14, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [commander](https://github.com/tj/commander.js) | [`14.0.3` → `15.0.0`](https://renovatebot.com/diffs/npm/commander/14.0.3/15.0.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/commander/15.0.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/commander/14.0.3/15.0.0?slim=true) |

---

### Release Notes

<details>
<summary>tj/commander.js (commander)</summary>

### [`v15.0.0`](https://github.com/tj/commander.js/blob/HEAD/CHANGELOG.md#1500-2026-05-29)

[Compare Source](tj/commander.js@v14.0.3...v15.0.0)

Commander 15 is ESM only. This is expected to be seamless for ESM consumers, but some CommonJS consumers may hit issues with tooling requiring configuration for ESM-only dependencies. See Migration Tips below.

The release of Commander 15 moves Commander 14 into maintenance. Commander 14 will get security updates for
12 months (to May 2027). For more info see [Release Policy](./docs/release-policy.md).

##### Added

- show excess command-arguments in error message (\[[#&#8203;2384](tj/commander.js#2384)])

##### Fixed

- *Breaking:* only lone `--no-*` option sets default option value to `true`, default not implicitly set when define both positive and negative option in either order (\[[#&#8203;2405](tj/commander.js#2405)])
- update example to use compatible character for MINGW64 (\[[#&#8203;2475](tj/commander.js#2475)])

##### Changed

- *Breaking:* migrated Commander implementation from CommonJS to ESM (\[[#&#8203;2464](tj/commander.js#2464)])
- *Breaking:* Commander 15 requires Node.js v22.12.0 or higher (for `require(esm)`).
- dev: switch tests from Jest to `node:test` test runner (\[[#&#8203;2463](tj/commander.js#2463)])

##### Deleted

- *Breaking:* removed deprecated export of `commander/esm.mjs` (\[[#&#8203;2464](tj/commander.js#2464)])

##### Migration Tips

Commander 15 is ESM only, but this does not mean you need to migrate to ESM to use it. Importing ESM from CommonJS is
supported by Node.js, and Bun, and Deno. Hopefully it Just Works for you! However, you may be using a different runtime or
some other part of your setup that may not yet natively support importing ESM from CommonJS, such as your testing framework
or bundler.

If you have problems using Commander 15 in your environment, one option is stay on Commander 14 for now. Commander 14 will
get security updates until May 2027 and things will hopefully improve for your setup in the meantime.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTUuMCIsInVwZGF0ZWRJblZlciI6IjQzLjE5NS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119-->

Reviewed-on: https://codeberg.org/huskas-2189/Bookmark/pulls/85
huskas-2189 pushed a commit to huskas-2189/Bookmark that referenced this pull request Jun 19, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [commander](https://github.com/tj/commander.js) | [`14.0.3` → `15.0.0`](https://renovatebot.com/diffs/npm/commander/14.0.3/15.0.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/commander/15.0.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/commander/14.0.3/15.0.0?slim=true) |

---

### Release Notes

<details>
<summary>tj/commander.js (commander)</summary>

### [`v15.0.0`](https://github.com/tj/commander.js/blob/HEAD/CHANGELOG.md#1500-2026-05-29)

[Compare Source](tj/commander.js@v14.0.3...v15.0.0)

Commander 15 is ESM only. This is expected to be seamless for ESM consumers, but some CommonJS consumers may hit issues with tooling requiring configuration for ESM-only dependencies. See Migration Tips below.

The release of Commander 15 moves Commander 14 into maintenance. Commander 14 will get security updates for
12 months (to May 2027). For more info see [Release Policy](./docs/release-policy.md).

##### Added

- show excess command-arguments in error message (\[[#&#8203;2384](tj/commander.js#2384)])

##### Fixed

- *Breaking:* only lone `--no-*` option sets default option value to `true`, default not implicitly set when define both positive and negative option in either order (\[[#&#8203;2405](tj/commander.js#2405)])
- update example to use compatible character for MINGW64 (\[[#&#8203;2475](tj/commander.js#2475)])

##### Changed

- *Breaking:* migrated Commander implementation from CommonJS to ESM (\[[#&#8203;2464](tj/commander.js#2464)])
- *Breaking:* Commander 15 requires Node.js v22.12.0 or higher (for `require(esm)`).
- dev: switch tests from Jest to `node:test` test runner (\[[#&#8203;2463](tj/commander.js#2463)])

##### Deleted

- *Breaking:* removed deprecated export of `commander/esm.mjs` (\[[#&#8203;2464](tj/commander.js#2464)])

##### Migration Tips

Commander 15 is ESM only, but this does not mean you need to migrate to ESM to use it. Importing ESM from CommonJS is
supported by Node.js, and Bun, and Deno. Hopefully it Just Works for you! However, you may be using a different runtime or
some other part of your setup that may not yet natively support importing ESM from CommonJS, such as your testing framework
or bundler.

If you have problems using Commander 15 in your environment, one option is stay on Commander 14 for now. Commander 14 will
get security updates until May 2027 and things will hopefully improve for your setup in the meantime.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTUuMCIsInVwZGF0ZWRJblZlciI6IjQzLjE5NS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119-->

Reviewed-on: https://codeberg.org/huskas-2189/Bookmark/pulls/85
huskas-2189 pushed a commit to huskas-2189/Bookmark that referenced this pull request Jun 19, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [commander](https://github.com/tj/commander.js) | [`14.0.3` → `15.0.0`](https://renovatebot.com/diffs/npm/commander/14.0.3/15.0.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/commander/15.0.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/commander/14.0.3/15.0.0?slim=true) |

---

### Release Notes

<details>
<summary>tj/commander.js (commander)</summary>

### [`v15.0.0`](https://github.com/tj/commander.js/blob/HEAD/CHANGELOG.md#1500-2026-05-29)

[Compare Source](tj/commander.js@v14.0.3...v15.0.0)

Commander 15 is ESM only. This is expected to be seamless for ESM consumers, but some CommonJS consumers may hit issues with tooling requiring configuration for ESM-only dependencies. See Migration Tips below.

The release of Commander 15 moves Commander 14 into maintenance. Commander 14 will get security updates for
12 months (to May 2027). For more info see [Release Policy](./docs/release-policy.md).

##### Added

- show excess command-arguments in error message (\[[#&#8203;2384](tj/commander.js#2384)])

##### Fixed

- *Breaking:* only lone `--no-*` option sets default option value to `true`, default not implicitly set when define both positive and negative option in either order (\[[#&#8203;2405](tj/commander.js#2405)])
- update example to use compatible character for MINGW64 (\[[#&#8203;2475](tj/commander.js#2475)])

##### Changed

- *Breaking:* migrated Commander implementation from CommonJS to ESM (\[[#&#8203;2464](tj/commander.js#2464)])
- *Breaking:* Commander 15 requires Node.js v22.12.0 or higher (for `require(esm)`).
- dev: switch tests from Jest to `node:test` test runner (\[[#&#8203;2463](tj/commander.js#2463)])

##### Deleted

- *Breaking:* removed deprecated export of `commander/esm.mjs` (\[[#&#8203;2464](tj/commander.js#2464)])

##### Migration Tips

Commander 15 is ESM only, but this does not mean you need to migrate to ESM to use it. Importing ESM from CommonJS is
supported by Node.js, and Bun, and Deno. Hopefully it Just Works for you! However, you may be using a different runtime or
some other part of your setup that may not yet natively support importing ESM from CommonJS, such as your testing framework
or bundler.

If you have problems using Commander 15 in your environment, one option is stay on Commander 14 for now. Commander 14 will
get security updates until May 2027 and things will hopefully improve for your setup in the meantime.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTUuMCIsInVwZGF0ZWRJblZlciI6IjQzLjE5NS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119-->

Reviewed-on: https://codeberg.org/huskas-2189/Bookmark/pulls/85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn users about MINGW64 Windows incompatibility with slash (/) arguments

3 participants