gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

/help command doesn't clear with shortcut (Cmd + L)

Open jhk0530 opened this issue 1 year ago • 12 comments

What happened?

  1. run /help command
  2. clear it with Cmd + L
  3. didn't work
  4. clear it manually with /clear command

Image

What did you expect to happen?

I think shortcut for /clear (Cmd + L) should work.

Client information

  • CLI Version: 0.1.9
  • Git Commit: 34935d6
  • Operating System: darwin v22.13.1
  • Sandbox Environment: no sandbox
  • Model Version: gemini-2.5-pro
  • Memory Usage: 197.1 MB

Login information

No response

Anything else we need to know?

No response

jhk0530 avatar Jul 07 '25 14:07 jhk0530

@jhk0530 you opened this as a bug yet this is not documented as a supported shortcut...

I would argue this is more of a feature request if you are asking for support for Ctrl + L ?

Are you okay if I update it to a feature request?

jackwotherspoon avatar Jul 07 '25 14:07 jackwotherspoon

I guess this is documented as a shortcut here: https://github.com/google-gemini/gemini-cli/blob/524ede52d23c2c2d400cde3a80aaf54ba669cd02/docs/cli/commands.md?plain=1#L26

so leaving as bug 👍

jackwotherspoon avatar Jul 07 '25 14:07 jackwotherspoon

Yes, you understand my intention correctly.

I guess this is documented as a shortcut here:

gemini-cli/docs/cli/commands.md

Line 26 in 524ede5

  • Keyboard shortcut: Press Ctrl+L at any time to perform a clear action. so leaving as bug 👍

jhk0530 avatar Jul 07 '25 14:07 jhk0530

The command is actually Ctrl+L, not Cmd+L, and it works as expected on my Mac.

swissspidy avatar Jul 07 '25 15:07 swissspidy

The command is actually Ctrl+L, not Cmd+L, and it works as expected on my Mac.

which terminal are you using? for me it doesn't work

Seydulla avatar Jul 07 '25 15:07 Seydulla

Yes, that's right. I unconsciously wrote CMD + L. It should be Ctrl + L.

However, Ctrl + L didn't work for me, I used default terminal.app of MacOS

jhk0530 avatar Jul 07 '25 15:07 jhk0530

The command is actually Ctrl+L, not Cmd+L, and it works as expected on my Mac.

@swissspidy Ctrl+L works for me, but the issue here is that the /help text is not cleared with Ctrl+L...

Run /help and then Ctrl+L and the help command output remains in the terminal...

jackwotherspoon avatar Jul 07 '25 15:07 jackwotherspoon

It seems to be an issue with the /help command being anchored as similar thing happens when you run Ctrl+T with the help command displayed... all tools information is displayed above the help output and it remains anchored on screen.

jackwotherspoon avatar Jul 07 '25 16:07 jackwotherspoon

Hey that's interesting I find the same issue in both iTerm2 and vscode on macOS

devpool007 avatar Jul 07 '25 21:07 devpool007

This is because the rendering of the /help command's output is tied to React state that is unaffected by the standard clear, likely to avoid coupling the output of /help with history and context. Passing the state down so that it can be toggled on keypress provides the desired UX.

psinha40898 avatar Jul 09 '25 11:07 psinha40898

I'd suggest we resolve this by fixing how help is rendered. help should just render is a message rather than its own ui. that way it can just be included in the history and will clear normally. That will also resolve flickering when showing help.

jacob314 avatar Jul 29 '25 22:07 jacob314

I also see the GEMINI logo appear multiple times when using help. Seems to be related to the same issue.

Image

akhil29 avatar Jul 30 '25 12:07 akhil29