File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
custom-completions/md-to-clip Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Converter from TlDr format to Command Line Interface Pages format.
2
+ # https://github.com/command-line-interface-pages/v2-tooling/tree/main/md-to-clip
3
+ export extern "md-to-clip" [
4
+ file : path @" nu-complete md-to-clip mdfiles" # Source tldr page to convert
5
+ -- help (- h ) # Display help
6
+ -- version (- v ) # Display version
7
+ -- author (- a ) # Display author
8
+ -- email (- e ) # Display author email
9
+ -- no-file-save # Whether to display conversion result in stdout instead of writing it to a file
10
+ -- output-directory : path @" nu-complete md-to-clip dirs" # Directory where conversion result will be written
11
+ -- special-placeholder-config : path # Config with special placeholders
12
+ ]
13
+ # "old-style long switch" flags are not covered because Nushell does not currently support them https://github.com/nushell/nushell/issues/5959
14
+ # `-nfs`, `-od`, `-spc`
15
+
16
+ def "nu-complete md-to-clip dirs" [] {
17
+ ls | where type == ' dir' | get name
18
+ }
19
+
20
+ def "nu-complete md-to-clip mdfiles" [] {
21
+ ls | where type == ' dir' or name ends-with ' .md' | get name
22
+ }
You can’t perform that action at this time.
0 commit comments