Skip to content

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

@deevus

Description

@deevus

Problem

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

Repro

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

#!/usr/bin/env bash

#USAGE flag "--shell <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 <sh> or --exec <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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions