Skip to content

Commit 021f50d

Browse files
gbrlsGabriel Schneider
andauthored
Add television custom-completions (#1239)
Co-authored-by: Gabriel Schneider <gbrls@0x4200.cafe>
1 parent 16e4eaa commit 021f50d

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# `television` custom completions
2+
3+
This script provides custom completions for `television`.
4+
It can be used by importing its exported commands via:
5+
6+
```
7+
use path/to/television/television-completions.nu *
8+
```
9+
10+
With `path/to/` being either the relative path of the file to your current working directory or its absolute path.
11+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
def "nu-complete tv channels" [] {
2+
^tv list-channels
3+
| lines
4+
}
5+
6+
export extern "tv" [
7+
channel: string@"nu-complete tv channels"
8+
]
9+
10+
# Lists the available channels
11+
export extern "tv list-channels" []
12+
# Initializes shell completion ("tv init zsh")
13+
export extern "tv init" []
14+
# Generates standard shell tab-completion scripts for tv's various subcommands
15+
export extern "tv completions" []
16+
# Downloads the latest collection of channel prototypes from github and saves them to the local configuration directory
17+
export extern "tv update-channels" []
18+
# Print this message or the help of the given subcommand(s)
19+
export extern "tv help" []

0 commit comments

Comments
 (0)