docs/src/commands.md

55 lines · 1556 bytes

 1# Commands
 2
 3Commands can be entered to the TUI by pressing the `:` key, the same as in Vim. Some commands have shorter *alternatives* that can be used instead.
 4
 5> Env variables can be used by passing in as `${key}`, such as `:channel ${channel-id}` when in a video or playlist page.
 6
 7**Loadpage commands** can also be used when launching, for example `youtube-tui loadpage popular` or `youtube-tui popular`.
 8
 9Below are the avaliable commands:
10
11## Loadpage
12
13`loadpage` can be used to load a specific page.
14
15```vim
16loadpage popular (alt: `popular`)
17loadpage trending (alt: `trending`)
18loadpage watchhistory (alt: `watchhistory`)
19loadpage search [search query] (alt: `search [search query]`)
20loadpage video [id or url] (alt: `video [id or url]`)
21loadpage playlist [id or url] (alt: `playlist [id or url] `)
22loadpage channel [id or url] (alt: `channel [id or url] `)
23```
24
25## History
26
27`history` is used to manage page history (`Backspace` equivalent).
28
29```vim
30history back (alt: `back`)
31history clear
32```
33
34## Utility
35
36```vim
37reload (alt `r`)
38reload configs (alt `reload/r config/configs`)
39flush
40quit (alt `q`, `exit`, `x`)
41run [command]
42```
43
44> The `flush` command is used to run all tasks in queue immediately, this is usually done automatically.
45>
46> But for when tasks are stacked up in the *same* event loop and the order of which they are executed matters, this command can be used to force the already stacked up commands to be ran first.
47
48## Text commands
49
50Text commands generates a *text only response* without launching the TUI.
51
52```vim
53help
54version
55```