diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d1175c9..edaa8aa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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). - 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 existing `doc` command has been renamed to `help` so that it is more natural for users (#2125). ### Added diff --git a/doc.md b/doc.md index 637b6c23..cca4cc37 100644 --- a/doc.md +++ b/doc.md @@ -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 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 ``) inside lf to view the documentation in a pager. +You can also use the `help` command (default ``) 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 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 i $$PAGER "$f" map w $$SHELL - cmd doc $$lf -doc | $PAGER - map doc + cmd help $$lf -doc | $PAGER + map help cmd maps $lf -remote "query $id maps" | $PAGER cmd nmaps $lf -remote "query $id nmaps" | $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 i !%PAGER% %f% map w $%SHELL% - cmd doc !%lf% -doc | %PAGER% - map doc + cmd help !%lf% -doc | %PAGER% + map help cmd maps !%lf% -remote "query %id% maps" | %PAGER% cmd nmaps !%lf% -remote "query %id% nmaps" | %PAGER% cmd vmaps !%lf% -remote "query %id% vmaps" | %PAGER% diff --git a/doc.txt b/doc.txt index 5a5e2ead..4ba08947 100644 --- a/doc.txt +++ b/doc.txt @@ -18,7 +18,7 @@ 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 You can also -use the doc command (default ) inside lf to view the documentation +use the help command (default ) 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 @@ -257,8 +257,8 @@ The following commands/keybindings are provided by default: map e $$EDITOR "$f" map i $$PAGER "$f" map w $$SHELL - cmd doc $$lf -doc | $PAGER - map doc + cmd help $$lf -doc | $PAGER + map help cmd maps $lf -remote "query $id maps" | $PAGER cmd nmaps $lf -remote "query $id nmaps" | $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 i !%PAGER% %f% map w $%SHELL% - cmd doc !%lf% -doc | %PAGER% - map doc + cmd help !%lf% -doc | %PAGER% + map help cmd maps !%lf% -remote "query %id% maps" | %PAGER% cmd nmaps !%lf% -remote "query %id% nmaps" | %PAGER% cmd vmaps !%lf% -remote "query %id% vmaps" | %PAGER% diff --git a/etc/lfrc.cmd.example b/etc/lfrc.cmd.example index c1bfd155..d5453581 100644 --- a/etc/lfrc.cmd.example +++ b/etc/lfrc.cmd.example @@ -22,8 +22,8 @@ map i $less %f% # change the shell used in default shell keybinding map w $powershell -# change 'doc' command to use a different pager -cmd doc $lf -doc | less +# change 'help' command to use a different pager +cmd help $lf -doc | less # leave some space at the top and the bottom of the screen set scrolloff 10 diff --git a/etc/lfrc.ps1.example b/etc/lfrc.ps1.example index 2a72656f..58eeb990 100644 --- a/etc/lfrc.ps1.example +++ b/etc/lfrc.ps1.example @@ -21,8 +21,7 @@ cmd open &&$Env:OPENER.Trim('"', ' ') "$Env:f" map e $&$Env:EDITOR "$Env:f" map i !&$Env:PAGER "$Env:f" map w $&$Env:SHELL -cmd doc !&$Env:lf -doc | &$Env:PAGER -map doc +cmd help !&$Env:lf -doc | &$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 vmaps !&$Env:lf -remote "query $Env:id vmaps" | &$Env:PAGER diff --git a/lf.1 b/lf.1 index fc593ca9..f1c22425 100644 --- a/lf.1 +++ b/lf.1 @@ -1,6 +1,6 @@ .\" 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 lf \- terminal file manager .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 .UR https://github.com/gokcehan/lf/blob/master/doc.md .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[R]) inside lf to view the documentation in a pager. A man page with the same content is also available in the repository at \c @@ -278,8 +278,8 @@ cmd open &$OPENER \(dq$f\(dq map e $$EDITOR \(dq$f\(dq map i $$PAGER \(dq$f\(dq map w $$SHELL -cmd doc $$lf \-doc | $PAGER -map doc +cmd help $$lf \-doc | $PAGER +map help cmd maps $lf \-remote \(dqquery $id maps\(dq | $PAGER cmd nmaps $lf \-remote \(dqquery $id nmaps\(dq | $PAGER cmd vmaps $lf \-remote \(dqquery $id vmaps\(dq | $PAGER @@ -291,8 +291,8 @@ cmd open &%OPENER% %f% map e $%EDITOR% %f% map i !%PAGER% %f% map w $%SHELL% -cmd doc !%lf% \-doc | %PAGER% -map doc +cmd help !%lf% \-doc | %PAGER% +map help cmd maps !%lf% \-remote \(dqquery %id% maps\(dq | %PAGER% cmd nmaps !%lf% \-remote \(dqquery %id% nmaps\(dq | %PAGER% cmd vmaps !%lf% \-remote \(dqquery %id% vmaps\(dq | %PAGER% diff --git a/os.go b/os.go index 7685e18b..65a3bc58 100644 --- a/os.go +++ b/os.go @@ -164,9 +164,9 @@ func setDefaults() { gOpts.nkeys["w"] = &execExpr{"$", "$SHELL"} gOpts.vkeys["w"] = &execExpr{"$", "$SHELL"} - gOpts.cmds["doc"] = &execExpr{"$", `"$lf" -doc | $PAGER`} - gOpts.nkeys[""] = &callExpr{"doc", nil, 1} - gOpts.vkeys[""] = &callExpr{"doc", nil, 1} + gOpts.cmds["help"] = &execExpr{"$", `"$lf" -doc | $PAGER`} + gOpts.nkeys[""] = &callExpr{"help", nil, 1} + gOpts.vkeys[""] = &callExpr{"help", nil, 1} gOpts.cmds["maps"] = &execExpr{"$", `"$lf" -remote "query $id maps" | $PAGER`} gOpts.cmds["nmaps"] = &execExpr{"$", `"$lf" -remote "query $id nmaps" | $PAGER`} diff --git a/os_windows.go b/os_windows.go index 6b897d27..d272b969 100644 --- a/os_windows.go +++ b/os_windows.go @@ -160,9 +160,9 @@ func setDefaults() { gOpts.nkeys["w"] = &execExpr{"$", "%SHELL%"} gOpts.vkeys["w"] = &execExpr{"$", "%SHELL%"} - gOpts.cmds["doc"] = &execExpr{"!", "%lf% -doc | %PAGER%"} - gOpts.nkeys[""] = &callExpr{"doc", nil, 1} - gOpts.vkeys[""] = &callExpr{"doc", nil, 1} + gOpts.cmds["help"] = &execExpr{"!", "%lf% -doc | %PAGER%"} + gOpts.nkeys[""] = &callExpr{"help", nil, 1} + gOpts.vkeys[""] = &callExpr{"help", nil, 1} gOpts.cmds["maps"] = &execExpr{"!", `%lf% -remote "query %id% maps" | %PAGER%`} gOpts.cmds["nmaps"] = &execExpr{"!", `%lf% -remote "query %id% nmaps" | %PAGER%`}