jdx / jdx/usage

Task flag --shell <shell> not working without -- separator

Open
#315 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1k
Forks
59
Avg merge
5h 58m
Merged PRs (30d)
362

Description

## Problem

The specific combination of `--shell ` as a task flag doesn't work unless I use `--`. Other flag names work fine.

## Repro

Task with `--shell` flag (doesn't work):

```bash
#!/usr/bin/env bash

#USAGE flag "--shell "

if [[ -n "$usage_shell" ]]; then
echo "Selected shell: $usage_shell"
else
echo "No shell selected (usage_shell is empty)"
fi
```

Running `mise run test --shell bash` outputs nothing.

Running `mise run test -- --shell bash` works and outputs "Selected shell: bash".

## What works

If I rename the flag to something else (e.g., `--sh ` or `--exec `), it works without the `--` separator.

## Environment

- mise version: 2025.8.8 macos-arm64 (2025-08-11)
- OS: macOS 15.5 on Apple M1 Pro

## Notes

Seems like `--shell` might be conflicting with a mise internal flag? Not sure how to debug this further.

Could be something specific to my environment - would be good to know if others can reproduce this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.