From d2df57c0111b3ffe48026c83e556e215b5c8d893 Mon Sep 17 00:00:00 2001 From: Jatinderjit Singh Date: Sun, 19 Apr 2026 03:27:35 +0530 Subject: [PATCH] Update `tldr` completions for commands --- custom-completions/tldr/tldr-completions.nu | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/custom-completions/tldr/tldr-completions.nu b/custom-completions/tldr/tldr-completions.nu index 978ec1ca6..71e068eaa 100644 --- a/custom-completions/tldr/tldr-completions.nu +++ b/custom-completions/tldr/tldr-completions.nu @@ -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