You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cli.rs
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,18 @@ must be separated by a line containing only the '%' character.\n\n\
12
12
You can specify a custom fortune file with `--file`, or manage configuration, \
13
13
fortune files, and cache using subcommands:\n\n\
14
14
• `config init` Create a configuration file with default options.\n\
15
+
• `config edit` Edit the configuration file using the system or a chosen editor.\n\
15
16
• `file init` Create a sample default fortune file (rfortune.dat).\n\
16
17
• `cache clear` Remove all cached last-used fortunes.\n\n\
17
18
This makes it easy to test, customize and extend your fortune collections \
18
19
while preserving the spirit of the original UNIX command.",
19
-
after_help = "EXAMPLES:\n rfortune\n Print a random fortune from the default file (rfortune.dat).\n\n rfortune --file ~/fortunes/misc\n Print a random fortune from the file ~/fortunes/misc.\n\n rfortune config init\n Create a default configuration file in the user data directory.\n\n rfortune file init\n Create a sample fortune file (rfortune.dat) in the user data directory.\n\n rfortune cache clear\n Remove all cached last-used fortunes."
20
+
after_help = "EXAMPLES:\n rfortune\n Print a random fortune from the default file (rfortune.dat).\n\n\
21
+
rfortune --file ~/fortunes/misc\n Print a random fortune from the file ~/fortunes/misc.\n\n\
22
+
rfortune config init\n Create a default configuration file in the user data directory.\n\n\
23
+
rfortune config edit\n Open the configuration file in your default system editor.\n\n\
24
+
rfortune config edit --editor vi\n Open the configuration file with a specific editor.\n\n\
25
+
rfortune file init\n Create a sample fortune file (rfortune.dat) in the user data directory.\n\n\
26
+
rfortune cache clear\n Remove all cached last-used fortunes."
20
27
)]
21
28
pubstructCli{
22
29
/// Fortune file to use instead of the default (rfortune.dat)
@@ -50,6 +57,13 @@ pub enum Commands {
50
57
pubenumConfigAction{
51
58
/// Initialize the configuration file
52
59
Init,
60
+
61
+
/// Edit the configuration file with the system or custom editor
0 commit comments