Rename doc command to help (#2125)

* Rename `doc` command to `help`

* Update `CHANGELOG.md`
This commit is contained in:
Joe Lim authored and GitHub committed 2025-08-28 14:47:36 +10:00
1 parent ad5af1b2c7
commit f26b30be18
8 files changed
+26 -26

No files matched your search

+1
View File
@@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
- Sixel image support is now enabled by default, and the `sixel` option has been removed as it is no longer required (#2109). - Sixel image support is now enabled by default, and the `sixel` option has been removed as it is no longer required (#2109).
- The `dircache` option has now been removed (#2110). This was previously used as a workaround to disable the directory cache since at the time changes to files were not detected reliably, but this is no longer the case. - The `dircache` option has now been removed (#2110). This was previously used as a workaround to disable the directory cache since at the time changes to files were not detected reliably, but this is no longer the case.
- The experimental `locale` option has been removed in favor of the recommendation to use `addcustominfo`/`set sortby custom` for custom sorting (#2111). - The experimental `locale` option has been removed in favor of the recommendation to use `addcustominfo`/`set sortby custom` for custom sorting (#2111).
- The existing `doc` command has been renamed to `help` so that it is more natural for users (#2125).
### Added ### Added
+5 -5
View File
@@ -29,7 +29,7 @@ lf is a terminal file manager.
The source code can be found in the repository at https://github.com/gokcehan/lf The source code can be found in the repository at https://github.com/gokcehan/lf
This documentation can either be read from the terminal using `lf -doc` or online at https://github.com/gokcehan/lf/blob/master/doc.md This documentation can either be read from the terminal using `lf -doc` or online at https://github.com/gokcehan/lf/blob/master/doc.md
You can also use the `doc` command (default `<f-1>`) inside lf to view the documentation in a pager. You can also use the `help` command (default `<f-1>`) inside lf to view the documentation in a pager.
A man page with the same content is also available in the repository at https://github.com/gokcehan/lf/blob/master/lf.1 A man page with the same content is also available in the repository at https://github.com/gokcehan/lf/blob/master/lf.1
You can run `lf -help` to see descriptions of command line options. You can run `lf -help` to see descriptions of command line options.
@@ -266,8 +266,8 @@ The following commands/keybindings are provided by default:
map e $$EDITOR "$f" map e $$EDITOR "$f"
map i $$PAGER "$f" map i $$PAGER "$f"
map w $$SHELL map w $$SHELL
cmd doc $$lf -doc | $PAGER cmd help $$lf -doc | $PAGER
map <f-1> doc map <f-1> help
cmd maps $lf -remote "query $id maps" | $PAGER cmd maps $lf -remote "query $id maps" | $PAGER
cmd nmaps $lf -remote "query $id nmaps" | $PAGER cmd nmaps $lf -remote "query $id nmaps" | $PAGER
cmd vmaps $lf -remote "query $id vmaps" | $PAGER cmd vmaps $lf -remote "query $id vmaps" | $PAGER
@@ -279,8 +279,8 @@ The following commands/keybindings are provided by default:
map e $%EDITOR% %f% map e $%EDITOR% %f%
map i !%PAGER% %f% map i !%PAGER% %f%
map w $%SHELL% map w $%SHELL%
cmd doc !%lf% -doc | %PAGER% cmd help !%lf% -doc | %PAGER%
map <f-1> doc map <f-1> help
cmd maps !%lf% -remote "query %id% maps" | %PAGER% cmd maps !%lf% -remote "query %id% maps" | %PAGER%
cmd nmaps !%lf% -remote "query %id% nmaps" | %PAGER% cmd nmaps !%lf% -remote "query %id% nmaps" | %PAGER%
cmd vmaps !%lf% -remote "query %id% vmaps" | %PAGER% cmd vmaps !%lf% -remote "query %id% vmaps" | %PAGER%
+5 -5
View File
@@ -18,7 +18,7 @@ https://github.com/gokcehan/lf
This documentation can either be read from the terminal using lf -doc or This documentation can either be read from the terminal using lf -doc or
online at https://github.com/gokcehan/lf/blob/master/doc.md You can also online at https://github.com/gokcehan/lf/blob/master/doc.md You can also
use the doc command (default <f-1>) inside lf to view the documentation use the help command (default <f-1>) inside lf to view the documentation
in a pager. A man page with the same content is also available in the in a pager. A man page with the same content is also available in the
repository at https://github.com/gokcehan/lf/blob/master/lf.1 repository at https://github.com/gokcehan/lf/blob/master/lf.1
@@ -257,8 +257,8 @@ The following commands/keybindings are provided by default:
map e $$EDITOR "$f" map e $$EDITOR "$f"
map i $$PAGER "$f" map i $$PAGER "$f"
map w $$SHELL map w $$SHELL
cmd doc $$lf -doc | $PAGER cmd help $$lf -doc | $PAGER
map <f-1> doc map <f-1> help
cmd maps $lf -remote "query $id maps" | $PAGER cmd maps $lf -remote "query $id maps" | $PAGER
cmd nmaps $lf -remote "query $id nmaps" | $PAGER cmd nmaps $lf -remote "query $id nmaps" | $PAGER
cmd vmaps $lf -remote "query $id vmaps" | $PAGER cmd vmaps $lf -remote "query $id vmaps" | $PAGER
@@ -270,8 +270,8 @@ The following commands/keybindings are provided by default:
map e $%EDITOR% %f% map e $%EDITOR% %f%
map i !%PAGER% %f% map i !%PAGER% %f%
map w $%SHELL% map w $%SHELL%
cmd doc !%lf% -doc | %PAGER% cmd help !%lf% -doc | %PAGER%
map <f-1> doc map <f-1> help
cmd maps !%lf% -remote "query %id% maps" | %PAGER% cmd maps !%lf% -remote "query %id% maps" | %PAGER%
cmd nmaps !%lf% -remote "query %id% nmaps" | %PAGER% cmd nmaps !%lf% -remote "query %id% nmaps" | %PAGER%
cmd vmaps !%lf% -remote "query %id% vmaps" | %PAGER% cmd vmaps !%lf% -remote "query %id% vmaps" | %PAGER%
+2 -2
View File
@@ -22,8 +22,8 @@ map i $less %f%
# change the shell used in default shell keybinding # change the shell used in default shell keybinding
map w $powershell map w $powershell
# change 'doc' command to use a different pager # change 'help' command to use a different pager
cmd doc $lf -doc | less cmd help $lf -doc | less
# leave some space at the top and the bottom of the screen # leave some space at the top and the bottom of the screen
set scrolloff 10 set scrolloff 10
+1 -2
View File
@@ -21,8 +21,7 @@ cmd open &&$Env:OPENER.Trim('"', ' ') "$Env:f"
map e $&$Env:EDITOR "$Env:f" map e $&$Env:EDITOR "$Env:f"
map i !&$Env:PAGER "$Env:f" map i !&$Env:PAGER "$Env:f"
map w $&$Env:SHELL map w $&$Env:SHELL
cmd doc !&$Env:lf -doc | &$Env:PAGER cmd help !&$Env:lf -doc | &$Env:PAGER
map <f-1> doc
cmd maps !&$Env:lf -remote "query $Env:id maps" | &$Env:PAGER cmd maps !&$Env:lf -remote "query $Env:id maps" | &$Env:PAGER
cmd nmaps !&$Env:lf -remote "query $Env:id nmaps" | &$Env:PAGER cmd nmaps !&$Env:lf -remote "query $Env:id nmaps" | &$Env:PAGER
cmd vmaps !&$Env:lf -remote "query $Env:id vmaps" | &$Env:PAGER cmd vmaps !&$Env:lf -remote "query $Env:id vmaps" | &$Env:PAGER
+6 -6
View File
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.7.0.2 .\" Automatically generated by Pandoc 3.7.0.2
.\" .\"
.TH "LF" "1" "2025\-08\-27" "r37" "DOCUMENTATION" .TH "LF" "1" "2025\-08\-28" "r37" "DOCUMENTATION"
.SH NAME .SH NAME
lf \- terminal file manager lf \- terminal file manager
.SH SYNOPSIS .SH SYNOPSIS
@@ -24,7 +24,7 @@ This documentation can either be read from the terminal using
\f[CR]lf \-doc\f[R] or online at \c \f[CR]lf \-doc\f[R] or online at \c
.UR https://github.com/gokcehan/lf/blob/master/doc.md .UR https://github.com/gokcehan/lf/blob/master/doc.md
.UE \c .UE \c
\ You can also use the \f[CR]doc\f[R] command (default \ You can also use the \f[CR]help\f[R] command (default
\f[CR]<f\-1>\f[R]) inside lf to view the documentation in a pager. \f[CR]<f\-1>\f[R]) inside lf to view the documentation in a pager.
A man page with the same content is also available in the repository at A man page with the same content is also available in the repository at
\c \c
@@ -278,8 +278,8 @@ cmd open &$OPENER \(dq$f\(dq
map e $$EDITOR \(dq$f\(dq map e $$EDITOR \(dq$f\(dq
map i $$PAGER \(dq$f\(dq map i $$PAGER \(dq$f\(dq
map w $$SHELL map w $$SHELL
cmd doc $$lf \-doc | $PAGER cmd help $$lf \-doc | $PAGER
map <f\-1> doc map <f\-1> help
cmd maps $lf \-remote \(dqquery $id maps\(dq | $PAGER cmd maps $lf \-remote \(dqquery $id maps\(dq | $PAGER
cmd nmaps $lf \-remote \(dqquery $id nmaps\(dq | $PAGER cmd nmaps $lf \-remote \(dqquery $id nmaps\(dq | $PAGER
cmd vmaps $lf \-remote \(dqquery $id vmaps\(dq | $PAGER cmd vmaps $lf \-remote \(dqquery $id vmaps\(dq | $PAGER
@@ -291,8 +291,8 @@ cmd open &%OPENER% %f%
map e $%EDITOR% %f% map e $%EDITOR% %f%
map i !%PAGER% %f% map i !%PAGER% %f%
map w $%SHELL% map w $%SHELL%
cmd doc !%lf% \-doc | %PAGER% cmd help !%lf% \-doc | %PAGER%
map <f\-1> doc map <f\-1> help
cmd maps !%lf% \-remote \(dqquery %id% maps\(dq | %PAGER% cmd maps !%lf% \-remote \(dqquery %id% maps\(dq | %PAGER%
cmd nmaps !%lf% \-remote \(dqquery %id% nmaps\(dq | %PAGER% cmd nmaps !%lf% \-remote \(dqquery %id% nmaps\(dq | %PAGER%
cmd vmaps !%lf% \-remote \(dqquery %id% vmaps\(dq | %PAGER% cmd vmaps !%lf% \-remote \(dqquery %id% vmaps\(dq | %PAGER%
+3 -3
View File
@@ -164,9 +164,9 @@ func setDefaults() {
gOpts.nkeys["w"] = &execExpr{"$", "$SHELL"} gOpts.nkeys["w"] = &execExpr{"$", "$SHELL"}
gOpts.vkeys["w"] = &execExpr{"$", "$SHELL"} gOpts.vkeys["w"] = &execExpr{"$", "$SHELL"}
gOpts.cmds["doc"] = &execExpr{"$", `"$lf" -doc | $PAGER`} gOpts.cmds["help"] = &execExpr{"$", `"$lf" -doc | $PAGER`}
gOpts.nkeys["<f-1>"] = &callExpr{"doc", nil, 1} gOpts.nkeys["<f-1>"] = &callExpr{"help", nil, 1}
gOpts.vkeys["<f-1>"] = &callExpr{"doc", nil, 1} gOpts.vkeys["<f-1>"] = &callExpr{"help", nil, 1}
gOpts.cmds["maps"] = &execExpr{"$", `"$lf" -remote "query $id maps" | $PAGER`} gOpts.cmds["maps"] = &execExpr{"$", `"$lf" -remote "query $id maps" | $PAGER`}
gOpts.cmds["nmaps"] = &execExpr{"$", `"$lf" -remote "query $id nmaps" | $PAGER`} gOpts.cmds["nmaps"] = &execExpr{"$", `"$lf" -remote "query $id nmaps" | $PAGER`}
+3 -3
View File
@@ -160,9 +160,9 @@ func setDefaults() {
gOpts.nkeys["w"] = &execExpr{"$", "%SHELL%"} gOpts.nkeys["w"] = &execExpr{"$", "%SHELL%"}
gOpts.vkeys["w"] = &execExpr{"$", "%SHELL%"} gOpts.vkeys["w"] = &execExpr{"$", "%SHELL%"}
gOpts.cmds["doc"] = &execExpr{"!", "%lf% -doc | %PAGER%"} gOpts.cmds["help"] = &execExpr{"!", "%lf% -doc | %PAGER%"}
gOpts.nkeys["<f-1>"] = &callExpr{"doc", nil, 1} gOpts.nkeys["<f-1>"] = &callExpr{"help", nil, 1}
gOpts.vkeys["<f-1>"] = &callExpr{"doc", nil, 1} gOpts.vkeys["<f-1>"] = &callExpr{"help", nil, 1}
gOpts.cmds["maps"] = &execExpr{"!", `%lf% -remote "query %id% maps" | %PAGER%`} gOpts.cmds["maps"] = &execExpr{"!", `%lf% -remote "query %id% maps" | %PAGER%`}
gOpts.cmds["nmaps"] = &execExpr{"!", `%lf% -remote "query %id% nmaps" | %PAGER%`} gOpts.cmds["nmaps"] = &execExpr{"!", `%lf% -remote "query %id% nmaps" | %PAGER%`}