Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions custom-completions/tldr/tldr-completions.nu
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
# authour: DWTW

def commands [] {
tldr --list | lines
}

def platformOverride [] {
[ "linux", "macos", "windows", "sunos", "osx", "android" ]
[linux macos sunos windows android freebsd netbsd openbsd common]
}

def whenColor [] {
[ "always", "auto", "never" ]
[always auto never]
}

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