feat: shorten default configuration flag to --default-config

This commit is contained in:
2026-10-11 17:15:37 +02:00
parent 35181634d6
commit b5eb4903db
3 changed files with 8 additions and 7 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ enum PlayerCommand {
terebi [--new-instance] [--no-config] --url YOUTUBE_URL
terebi [--new-instance] [--no-config] -- FILE
terebi --help
terebi --print-default-config
terebi --default-config
Open one local media file or YouTube video and start playback, resuming saved
video progress when available. With no arguments, open or activate the player.
@@ -21,7 +21,7 @@ enum PlayerCommand {
--url URL Open a YouTube video URL.
-- Treat the following argument as a filename, even with a leading '-'.
-h, --help Show this help without launching the player.
--print-default-config Print the complete built-in TOML without launching.
--default-config Print the complete built-in TOML without launching.
Reuses the running player unless --new-instance is supplied before the media
arguments. The command exits once macOS accepts the launch; playback and
@@ -44,7 +44,7 @@ enum PlayerCommand {
}
if inputs.isEmpty { return .launch(nil, newInstance: newInstance, noConfig: noConfig) }
if inputs == ["--help"] || inputs == ["-h"] { return .help }
if inputs == ["--print-default-config"] { return .printDefaultConfig }
if inputs == ["--default-config"] { return .printDefaultConfig }
if inputs.first == "--url" {
guard inputs.count == 2 else { throw ArgumentError("--url requires exactly one YouTube URL.") }
return .launch(try YouTubeResolver.validateURL(inputs[1]), newInstance: newInstance, noConfig: noConfig)