From: Ben Beltran Date: Mon, 13 May 2019 19:54:42 +0000 (+0200) Subject: Use single word long options X-Git-Tag: 1.0.0^2^2~16 X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli/commitdiff_plain/f43cbaf08072763aa3abd11736cfc77cd9457637?ds=inline;hp=-c Use single word long options --- f43cbaf08072763aa3abd11736cfc77cd9457637 diff --git a/README.md b/README.md index 5e7c995..5614f5d 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,11 @@ song and artist names before the lyrics. In order to configure -* `lrc -l` or `lrc --list-sources` lists the available sources. Enabled +* `lrc -l` or `lrc --list` lists the available sources. Enabled sourcess will have a `*` * `lrc -e` or `lrc --enable ` enables a source * `lrc -d` or `lrc --disable ` disables a source -* `lrc -r` or `lrc --reset-source ` resets the configuration for +* `lrc -r` or `lrc --reset ` resets the configuration for a source and disables it. * `lrc -v` or `lrc --version` prints the version * `lrc -h` or `lrc --help` display built-in help diff --git a/Sources/lyricli/lyricli_command.swift b/Sources/lyricli/lyricli_command.swift index 28ad44a..88f9c7b 100644 --- a/Sources/lyricli/lyricli_command.swift +++ b/Sources/lyricli/lyricli_command.swift @@ -6,19 +6,19 @@ class LyricliCommand: Command { // Flags let version = Flag(short: "v", long: "version", help: "Prints the version.") let showTitle = Flag(short: "t", long: "title", help: "Shows title of song if true") - let listSources = Flag(short: "l", long: "listSources", help: "Lists all sources") + let listSources = Flag(short: "l", long: "list", help: "Lists all sources") // Named Arguments let enableSource = Argument(name: "source", - kind: .named(short: "e", long: "enableSource"), + kind: .named(short: "e", long: "enable"), optional: true, help: "Enables a source") let disableSource = Argument(name: "source", - kind: .named(short: "d", long: "disableSource"), + kind: .named(short: "d", long: "disable"), optional: true, help: "Disables a source") let resetSource = Argument(name: "source", - kind: .named(short: "r", long: "resetSource"), + kind: .named(short: "r", long: "reset"), optional: true, help: "Resets a source")