Skip to content

shim task --help can be forwarded as a positional argument #111

Description

@quick-ricon

Symptom

Task-level --help is not consistently intercepted/rendered when a shiv-installed package task has required positional args. Instead, the task receives --help as its required file/path argument and fails inside task logic.

Concrete reproduction from today's session:

emails compose --help

Actual output:

mise ERROR no task compose found

from the bare installed shim path in one context, and when invoking the package task directly:

emails_dir="$(shiv which emails)"
mise -C "$emails_dir" run compose -- --help

actual output:

Error: file not found: /Users/rikonor/agents/or/home/modules/fold/--help
[compose] ERROR task failed

The emails package does contain .mise/tasks/compose with:

#USAGE arg "<file>" help="Path to .tsx file"
#USAGE arg "[args]" var=#true help="Arguments to pass to the TSX file"

So --help should show the generated usage for compose, not be passed through as <file>.

Expected behavior

For shiv shims and/or shiv-installed package invocation:

emails compose --help

should display the #USAGE help for the compose task, even though compose has a required positional arg.

Why this matters

Agents are instructed to read --help before guessing CLI interfaces. When --help is forwarded as a positional argument, it trains agents to inspect source or guess around the tooling. This has come up multiple times across tools.

Notes

Or mentioned that shiv-produced shims already attempt to intercept --help, so this may be a shim interception bug, an argument-forwarding edge case, or a mismatch between top-level package help and task-level help.

The issue may be especially visible for tasks with required positional args plus variadic passthrough args.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions