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 --yolo {extra_flags} --model={model} --prompt={escaped_instruction}

Into

gemini --yolo {extra_flags} --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

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalitytype/bug

Type

No fields configured for Bug.

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions