Skip to content

Commit c5387bd

Browse files
authored
Update tldr completions for commands (#1249)
1 parent 035e3c1 commit c5387bd

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

‎custom-completions/tldr/tldr-completions.nu‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
# authour: DWTW
22

3+
def commands [] {
4+
tldr --list | lines
5+
}
6+
37
def platformOverride [] {
4-
[ "linux", "macos", "windows", "sunos", "osx", "android" ]
8+
[linux macos sunos windows android freebsd netbsd openbsd common]
59
}
610

711
def whenColor [] {
8-
[ "always", "auto", "never" ]
12+
[always auto never]
913
}
1014

1115
# Collaborative cheatsheets for console commands
1216
export extern "tldr" [
13-
string?
17+
cmd?: string@commands
1418
--list(-l) # Lists all commands in the cache
19+
--edit-page # Edit custom page with `EDITOR`
20+
--edit-patch # Edit custom patch with `EDITOR`
1521
--render(-f): string # Render a specific markdown file
16-
--platform(-f): string@platformOverride # Override the operating system
22+
--platform(-p): string@platformOverride # Override the operating system, can be specified multiple times in order of preference
1723
--language(-L): string # Override the language
1824
--update(-u) # Update the local cache
19-
--no-auto-update # If auto update is configured. disable it for this run
25+
--no-auto-update # If auto update is configured, disable it for this run
2026
--clear-cache(-c) # Clear the local cache
27+
--config-path: path # Override config file location
2128
--pager # Use a pager to page output
2229
--raw(-r) # Display the raw markdown instead of rendering it
2330
--quiet(-q) # Suppress informational message

0 commit comments

Comments
 (0)