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

Single-key to access help/man for current-cmd #90

Open
bew opened this issue Jan 27, 2024 · 0 comments
Open

Single-key to access help/man for current-cmd #90

bew opened this issue Jan 27, 2024 · 0 comments

Comments

@bew
Copy link
Owner

bew commented Jan 27, 2024

When I'm writing a command, sometimes I want to quickly check the help or man page of a command.

Keybind idea: Ctrl-Alt-h

How it could work

Based on current cmdline (after aliases expansion!), parse and find all commands.
(Keep it simple first!)

For simple commands like mv, there's basically either:

  • some-cmd --help
  • man some-cmd

NOTE: For complex commands like git there are more than one help/man pages, so we could try to guess if a sub command was used by looking at first param, see if it matches ^[a-z_-]$ and add

For man candidates, check the manpage exists (use man to determine this, don't guess!).

Once we have all candidates, open a choice selector (even if only 1?) to interactively choose the one I want, then run it without saving into shell history (auto-pipe in pager?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant