Skip to content

Bug: Position argument not allow prompt start with - #19156

@xiaoxiangmoe

Description

@xiaoxiangmoe

What happened?

In https://geminicli.com/docs/cli/cli-reference/ , it told me--prompt was deprecated.

--prompt | -p | string | - | Prompt text. Appended to stdin input if provided. Deprecated: Use positional arguments instead.

So I try to change harbor's gemini-cli agent

From

gemini -p {escaped_instruction} -y -m {model} 

Into

gemini --yolo --model={model} {escaped_instruction}

Which use so called query positional argument, rather than --prompt option.

Then I found it break terminal-bench-2/pytorch-model-recovery/instruction.md

- You are given a PyTorch state dictionary (/app/weights.pt) representing the weights of a Pytorch model, and a dataset (/app/dataset.pt) containing input-output pairs. Your task is to..........
gemini --yolo --model=gemini-3-pro-preview '- You are given a PyTorch state dictionary (....'

Then

Unknown arguments: " ", Y, u

If gemini-cli encourages users to use positional argument, it will put gemini-cli at a disadvantage in the terminal bench 2 benchmark, which is unfair to gemini-cli.

Also there exist some user want to use prompt such like gemini --yolo --prompt="-1+2=?", use positional argument will also create bug.

What did you expect to happen?

I hope gemini-cli will deprecate position arguments. I recommend using --prompt= with gemini-cli.

To achieve higher scores for gemini-cli in the benchmark, gemini-cli should deprecate the query position arguments.

Client information

None

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalitystatus/need-triageIssues that need to be triaged by the triage automation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions