]> git.r.bdr.sh - rbdr/lyricli/blame - Sources/lyricli/lyricli_command.swift
Use single word long options
[rbdr/lyricli] / Sources / lyricli / lyricli_command.swift
CommitLineData
fdafe0d4
BB
1import Bariloche
2
3class LyricliCommand: Command {
4 let usage: String? = "Fetch the lyrics for current playing track or the one specified via arguments"
5
6 // Flags
7 let version = Flag(short: "v", long: "version", help: "Prints the version.")
8 let showTitle = Flag(short: "t", long: "title", help: "Shows title of song if true")
f43cbaf0 9 let listSources = Flag(short: "l", long: "list", help: "Lists all sources")
fdafe0d4
BB
10
11 // Named Arguments
12 let enableSource = Argument<String>(name: "source",
f43cbaf0 13 kind: .named(short: "e", long: "enable"),
fdafe0d4
BB
14 optional: true,
15 help: "Enables a source")
16 let disableSource = Argument<String>(name: "source",
f43cbaf0 17 kind: .named(short: "d", long: "disable"),
fdafe0d4
BB
18 optional: true,
19 help: "Disables a source")
20 let resetSource = Argument<String>(name: "source",
f43cbaf0 21 kind: .named(short: "r", long: "reset"),
fdafe0d4
BB
22 optional: true,
23 help: "Resets a source")
24
25 // Positional Arguments
26 let artist = Argument<String>(name: "artist",
27 kind: .positional,
28 optional: true,
29 help: "The name of the artist")
30 let trackName = Argument<String>(name: "trackName",
31 kind: .positional,
32 optional: true,
33 help: "The name of the track")
34
35 func run() -> Bool {
36 return true
37 }
38}