docs: document code.cmd editor on Windows

On Windows `code` works in the shell, but not when specified to jj, because the
executable is actually named `code.cmd`! This is a feature of Windows, where
certain file extensions (defined by the PATHEXT environment variable) are
automatically treated as executable and can have their extensions omitted.

Presumably, jj doesn't support this feature on Windows, though perhaps it
should. For now, avoid adding an explanation of PATHEXT so as to not clutter
things too much, and just suggest `code.cmd` on Windows. Most readers should be
able to put two and two together from there.
This commit is contained in:
Glen Choo 2024-05-28 10:24:14 +08:00 committed by glencbz
parent 3090adfd5c
commit 8a4087d07b

View file

@ -438,6 +438,7 @@ For GUI editors you possibly need to use a `-w` or `--wait`. Some examples:
```toml
ui.editor = "code -w" # VS Code
ui.editor = "code.cmd -w" # VS Code on Windows
ui.editor = "bbedit -w" # BBEdit
ui.editor = "subl -n -w" # Sublime Text
ui.editor = "mate -w" # TextMate