8000 Allow reading manpages by using F1. by sugar700 · Pull Request #1063 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

Allow reading manpages by using F1.#1063

Closed
sugar700 wants to merge 2 commits intomasterfrom
help
Closed

Allow reading manpages by using F1.#1063
sugar700 wants to merge 2 commits intomasterfrom
help

Conversation

@sugar700
Copy link
Contributor

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 commented Oct 29, 2013

That's pretty cool.

@smidm
Copy link
smidm commented Oct 30, 2013

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

@siteshwar
Copy link
Contributor

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 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 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 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 February 24, 2016 06:38
@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.
0