lf
lf copied to clipboard
"doc" command could be replace by the more common "help"
The documentation (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 ;-)
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.
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.
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".
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
helptolf -help - Rename
doctohelp - Map both
docandhelptolf -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.
No problem!
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.
I just had this problem/confusion, tried help but realized it is doc after reading this issue. Wanted to point this out here :wink: