mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-10-26 22:08:03 +03:00
30 lines
1.4 KiB
Plaintext
30 lines
1.4 KiB
Plaintext
|
# authour: DWTW
|
||
|
|
||
|
def platformOveride [] {
|
||
|
[ "linux", "macos", "windows", "sunos", "osx", "android" ]
|
||
|
}
|
||
|
|
||
|
def whenColor [] {
|
||
|
[ "always", "auto", "never" ]
|
||
|
}
|
||
|
|
||
|
# Collaborative cheatsheets for console commands
|
||
|
export extern "tldr" [
|
||
|
string?
|
||
|
--list(-l) # Lists all commands in the cache
|
||
|
--render(-f): string # Render a specific markdown file
|
||
|
--platform(-f): string@platformOveride # Override the operating system
|
||
|
--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
|
||
|
--clear-cache(-c) # Clear the local cache
|
||
|
--pager # Use a pager to page output
|
||
|
--raw(-r) # Display the raw markdown instead of rendering it
|
||
|
--quiet(-q) # Suppress informational message
|
||
|
--show-paths # Show file and directory paths using tealdeer
|
||
|
--seed-config # Create a basic config
|
||
|
--color: string@whenColor # Controls whether to use color
|
||
|
--version(-v) # Print the version
|
||
|
--help # Print the help information
|
||
|
]
|