Add introduction to the new online help system
This adds a very basic explanation of the new help command that can be displayed using ":help intro". This introduction is also added as default page so that users can simply type ":help" instead. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
2c25d99ad0
commit
08f5064ef7
@ -29,6 +29,7 @@ dist_doc_DATA = \
|
||||
general.txt \
|
||||
goto.txt \
|
||||
import.txt \
|
||||
intro.txt \
|
||||
main.txt \
|
||||
manual.txt \
|
||||
other.txt \
|
||||
|
15
doc/intro.txt
Normal file
15
doc/intro.txt
Normal file
@ -0,0 +1,15 @@
|
||||
calcurse Online Help
|
||||
====================
|
||||
|
||||
Welcome to the calcurse online help. The online help system allows for easily
|
||||
getting help on specific calcurse features.
|
||||
|
||||
On the calcurse main screen, type `:help <feature>` (e.g. `:help add`) to get
|
||||
help on a specific feature. Type `:help` without any parameter to display this
|
||||
introduction or simply use the corresponding keyboard shortcut (`?` by
|
||||
default).
|
||||
|
||||
All help texts are displayed using an external pager. You need to exit the
|
||||
pager in order to get back to calcurse (pressing `q` should almost always
|
||||
work). The default pager can be changed by setting the PAGER environment
|
||||
variable.
|
@ -503,6 +503,9 @@ static inline void key_generic_cmd(void)
|
||||
char *topic = strtok(NULL, " ");
|
||||
char path[BUFSIZ];
|
||||
|
||||
if (!topic)
|
||||
topic = "intro";
|
||||
|
||||
snprintf(path, BUFSIZ, DOCDIR "/%s.txt", topic);
|
||||
if (io_file_exist(path)) {
|
||||
wins_launch_external(path, conf.pager);
|
||||
|
Loading…
x
Reference in New Issue
Block a user