Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help and h command does not work if typed into cmdbuff #2154

Closed
eiachh opened this issue Jun 25, 2023 · 0 comments · Fixed by #2319 or #2326
Closed

Help and h command does not work if typed into cmdbuff #2154

eiachh opened this issue Jun 25, 2023 · 0 comments · Fixed by #2319 or #2326
Labels
bug Something isn't working enhancement New feature or request

Comments

@eiachh
Copy link
Contributor

eiachh commented Jun 25, 2023




Describe the bug
When writing the command name help or h into the commandline it does not activate the help view like it does with the shortcut <?>

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'commandline ":"'
  2. Write 'help' or 'h'
  3. Press 'enter'
  4. Nothing happens

Expected behavior
Help menu should appear like it does with the hotkey "<?>"

Versions (please complete the following information):

  • K9s: v0.27.4
  • K8s: v1.26.3

Additional context
When you type the command "help" or "h" in the function "helpCmd(evt *tcell.EventKey)" the first if statements renders as

  • a.CmdBuff().InCmdMode() = true
  • top != nil = true
  • top.InCmdMode() = false

Resulting as entering the first if statement and returning with "evt".
I don't know why is there a check for a.CmdBuff().InCmdMode() which checks the len(c.buff)>0 which prevents helpCmd from executing if help is typed into the commandline and not activated by hotkey. Probably for the hotkey to not trigger when typing?

@derailed derailed added AsDesigned Works as designed bug Something isn't working enhancement New feature or request labels Nov 22, 2023
wjiec added a commit to wjiec/k9s that referenced this issue Nov 29, 2023
@derailed derailed removed the AsDesigned Works as designed label Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants