lf icon indicating copy to clipboard operation
lf copied to clipboard

"doc" command could be replace by the more common "help"

Open jpggithub opened this issue 2 years ago • 7 comments

The documentation () give the information about the doc command but I suggest to replace its name by the word help. It is more common IMHO and also very useful... when you don't know how to display the documentation/help of lf in your terminal where F1 display the help... of the terminal ;-)

jpggithub avatar Jul 25 '23 17:07 jpggithub

I did a quick search of the history, it was added to address #100 so you can have a look at it for more details.

Regarding the name choice, I guess doc was chosen to reflect the difference between the -doc and -help command line flags, where the lf -doc displays the full documentation, but lf -help displays only the basic command line usage.

joelim-work avatar Jul 26 '23 01:07 joelim-work

Thanks for the history ;-) A new help command could display the same text than lf -help and also indicate that a "longer" version can be obtain with the doc command.

jpggithub avatar Jul 26 '23 07:07 jpggithub

The command doc could also be simply listed with the other commands that have a default shortcut. Currently, it is only indicated at the top of the documentation. In a first view, I hadn't see it at the top of the documentation because I'm simply "searching (to quickly perhaps ;-) what are the available commands".

jpggithub avatar Jul 26 '23 09:07 jpggithub

Yeah I guess I can see the argument for having help as the entry point for looking up documentation.

There are some approaches (not an exhaustive list):

  • Map help to lf -help
  • Rename doc to help
  • Map both doc and help to lf -doc

Changing this would be pretty easy, but I think it's better to see if anyone else has any comments before doing anything - I'm somewhat unwilling to make such a decision on my own.

joelim-work avatar Jul 26 '23 10:07 joelim-work

No problem!

jpggithub avatar Jul 26 '23 10:07 jpggithub

Maybe it was a mistake to use the name doc instead of help but I'm not sure if it is worth a breaking change at this point. The other two options (i.e. help for lf -help or doc) sounds more plausible to me. At some point, I had also considered adding a help command with a search argument by default to resemble the behavior in vim (e.g. cmd help $lf -doc | less +/$1), but I wasn't sure it was a good idea so I eventually forgot.

gokcehan avatar Jul 26 '23 18:07 gokcehan

I just had this problem/confusion, tried help but realized it is doc after reading this issue. Wanted to point this out here :wink:

izelnakri avatar Dec 26 '23 16:12 izelnakri