shell-completion does not support Git-Bash on windows.
Describe the bug
I wanted to install bash completions for marimo, but marimo did not correctly identify my shell, and produced no usable output.
There does not seem to be a way to specify the shell as a cli option (some tools allow this). "Git Bash" supports all the normal bash configuration files (I use the same ones as on my linux machines).
Environment
{
"marimo": "0.10.13",
"OS": "Windows",
"OS Version": "11",
"Processor": "ARMv8 (64-bit) Family 8 Model 805 Revision D0E, Qualcomm Technologies Inc",
"Python Version": "3.13.0",
"Binaries": {
"Browser": "128.0.6613.138",
"Node": "--"
},
"Dependencies": {
"click": "8.1.8",
"docutils": "0.21.2",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.7",
"narwhals": "1.22.0",
"packaging": "24.2",
"psutil": "6.1.1",
"pygments": "2.19.1",
"pymdown-extensions": "10.14",
"pyyaml": "6.0.2",
"ruff": "0.9.1",
"starlette": "0.45.2",
"tomlkit": "0.13.2",
"typing-extensions": "missing",
"uvicorn": "0.34.0",
"websockets": "14.1"
},
"Optional Dependencies": {
"duckdb": "1.1.3",
"pandas": "2.2.3",
"pyarrow": "18.1.0"
}
}
Code to reproduce
On a windows 11 machine, install git (which installs bash) per these instructions, and start a bash session, and then marimo shell-completion:
❯ marimo shell-completion
Unsupported shell: bash.exe. Supported shells: bash, zsh, fish
❯ echo $SHELL
/usr/bin/bash
❯ which -a bash
/usr/bin/bash
/bin/bash
❯ which -a bash.exe
/usr/bin/bash.exe
/bin/bash.exe
❯ bash --version
GNU bash, version 5.2.37(1)-release (x86_64-pc-msys)
...
❯ marimo --version
0.10.13
Hey @hwine - I tried exploring adding windows integration, but I dont use windows so couldn't test/verify. would you mind making the contribution for bash on windows?
Here is the relevant code. https://github.com/marimo-team/marimo/blob/a6413b3ec41573482276ab96676fd2209a364183/marimo/_cli/cli.py#L778-L821
Hey @hwine - I tried exploring adding windows integration, but I dont use windows so couldn't test/verify. would you mind making the contribution for bash on windows?
Here is the relevant code.
Sure - that looks like well within my abilities! Thanks for the direct pointer.
It will be a few days before I can get to it, though.
No rush! Very much appreciated!
Update: Good News! the fix is trivial Not so good news: the tests aren't testing anything useful. I can update the tests no problem
meh news: marimo doesn't exit with a non-zero exit code for bad cli arguments. I'll file a different bug for that.
Thanks for investigating! And surfacing the other issue as well.