File tree Expand file tree Collapse file tree 1 file changed +22
-19
lines changed Expand file tree Collapse file tree 1 file changed +22
-19
lines changed Original file line number Diff line number Diff line change @@ -32,26 +32,29 @@ program
32
32
. option ( '-u, --update' , 'Update the local cache' )
33
33
. option ( '-c, --clear-cache' , 'Clear the local cache' ) ;
34
34
35
+ const help = `
36
+ Examples:
37
+
38
+ $ tldr tar
39
+ $ tldr du --os=linux
40
+ $ tldr --search "create symbolic link to file"
41
+ $ tldr --list
42
+ $ tldr --list-all
43
+ $ tldr --random
44
+ $ tldr --random-example
45
+
46
+ To control the cache:
47
+
48
+ $ tldr --update
49
+ $ tldr --clear-cache
50
+
51
+ To render a local file (for testing):
52
+
53
+ $ tldr --render /path/to/file.md
54
+ ` ;
55
+
35
56
program . on ( '--help' , ( ) => {
36
- console . log ( 'Examples' ) ;
37
- console . log ( '' ) ;
38
- console . log ( ' $ tldr tar' ) ;
39
- console . log ( ' $ tldr du --os=linux' ) ;
40
- console . log ( ' $ tldr --search "create symbolic link to file"' ) ;
41
- console . log ( ' $ tldr --list' ) ;
42
- console . log ( ' $ tldr --list-all' ) ;
43
- console . log ( ' $ tldr --random' ) ;
44
- console . log ( ' $ tldr --random-example' ) ;
45
- console . log ( '' ) ;
46
- console . log ( 'To control the cache' ) ;
47
- console . log ( '' ) ;
48
- console . log ( ' $ tldr --update' ) ;
49
- console . log ( ' $ tldr --clear-cache' ) ;
50
- console . log ( '' ) ;
51
- console . log ( 'To render a local file (for testing)' ) ;
52
- console . log ( '' ) ;
53
- console . log ( ' $ tldr --render /path/to/file.md' ) ;
54
- console . log ( '' ) ;
57
+ console . log ( help ) ;
55
58
} ) ;
56
59
57
60
program . parse ( process . argv ) ;
You can’t perform that action at this time.
0 commit comments