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

Allow reading manpages by using F1. #1063

Closed
wants to merge 2 commits into from
Closed

Allow reading manpages by using F1. #1063

wants to merge 2 commits into from

Conversation

@xfix
Copy link
Member

@xfix xfix commented Oct 27, 2013

Just a small fun feature I have implemented in order to ease discovering command prompt. Just like in graphical applications, and some text interface programs (like vim, mc, emacs) it allows you to get help, in this case, help for currently typed command by simply pressing F1. I believe it could be helpful in many cases, for example if you want more detailed documentation than what Tab completion provides.

(also, yes, I added this to my personal bindings, and I like this)

@zanchey
Copy link
Member

@zanchey zanchey commented Oct 29, 2013

That's pretty cool.

@smidm
Copy link

@smidm smidm commented Oct 30, 2013

Really cool! I just added that to my config.fish.

@siteshwar
Copy link
Member

@siteshwar siteshwar commented Oct 31, 2013

Ship it!

EDIT:
There's a bug in the command which is used to show manpage. If I have a binary a.out in my current directory and type ./a.out and press F1, it will print binary data on screen.

@zanchey
Copy link
Member

@zanchey zanchey commented Nov 3, 2013

What about using man (basename (commandline -po)[1]) instead? That avoids passing a path to man.

This protects from providing paths to man, like `./a.out`.
@zanchey
Copy link
Member

@zanchey zanchey commented Nov 9, 2013

Merged with rebase:

To git@github.com:fish-shell/fish-shell.git
fe3bca3..ba2fcd9 master -> master

Documented at 63d93a2.

Unfortunately a few terminals bind F1 to their own nefarious purposes, but most people should be able to use this.

@zanchey zanchey closed this Nov 9, 2013
@nafg
Copy link

@nafg nafg commented Jul 22, 2015

This is great!
It would be even better if it would work with subcommands. E.g. git checkout should go to man git checkout

@zanchey zanchey deleted the help branch Feb 24, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.