diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-02 13:35:56 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-02 13:35:56 +0100 |
| commit | 5dfb5b4ce521a44eb4e9173d20c58e665c78e979 (patch) | |
| tree | 514508f9bef90444b867a68abfeb2ad365c44d14 /src/main.rs | |
| parent | audio: open the output at the track's rate instead of pw-alsa's 44100 (diff) | |
| download | rsplayer-5dfb5b4ce521a44eb4e9173d20c58e665c78e979.tar.gz rsplayer-5dfb5b4ce521a44eb4e9173d20c58e665c78e979.zip | |
ctl: interactive shell with history, editing and completion
`rsp ctl` opens a prompt in the spirit of bluetoothctl. Lines are parsed with
the same clap definitions as the one-shot CLI, so every command and flag works
exactly as it does from a terminal, `help <command>` included.
Tab completes subcommands, and track/album/artist paths for `play` through
`db-complete` (run out of process, keeping its 100 ms timeout away from the
input loop). History lives in the state directory. Piped input falls back to a
plain line loop, so `rsp ctl < commands` works without a terminal.
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 4bc4498..0138ea2 100644 --- a/src/main.rs +++ b/src/main.rs | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | mod audio; | 8 | mod audio; |
| 9 | mod cli; | 9 | mod cli; |
| 10 | mod config; | 10 | mod config; |
| 11 | mod ctl; | ||
| 11 | mod daemon; | 12 | mod daemon; |
| 12 | mod database; | 13 | mod database; |
| 13 | mod mpris; | 14 | mod mpris; |
