bash autocompletions

This commit is contained in:
adam committed 2026-09-28 17:18:41 +00:00
1 parent 47808ffa17
commit 675f5308e6
7 files changed
+157 -5

No files matched your search

+19 -1
View File
@@ -21,7 +21,8 @@ Run any number of vanilla Terraria and tModLoader dedicated servers on one Linux
15. [Permissions](#permissions)
16. [Running by hand for debugging](#running-by-hand-for-debugging)
17. [Troubleshooting](#troubleshooting)
18. [Command reference](#command-reference)
18. [Tab completion](#tab-completion)
19. [Command reference](#command-reference)
---
@@ -669,6 +670,23 @@ It was generated before the mods were added. Delete the world files in `data/Wor
---
## Tab completion
`terractl` comes with bash completion. Press Tab to complete:
- command names;
- instance names;
- `vanilla`/`tmodloader` for `new`;
- common server console commands for `cmd` (`save`, `say`, `playing`, `kick`...);
- the options of `reinstall` and `delete`;
- `mods` actions. For `mods add` it completes `.tmod` files and folders; for `mods enable` and `mods remove`, the installed mods; for `mods disable`, the enabled ones.
It works with `sudo terractl` too. It needs the `bash-completion` package, which most Debian and Ubuntu systems already have (`sudo apt install bash-completion`). It takes effect in new terminal sessions.
Completion runs as *you*, even when you type `sudo`. Instance and mod names therefore only complete if you can read `/var/lib/terraria`, which means being root or a member of the `terraria` group (see [Permissions](#permissions)). Otherwise, it falls back to the names of servers systemd currently knows about, and mod names don't complete.
---
## Command reference
```