feat: Add shell completions for zsh,fish
This commit is contained in:
parent
45dd2e2af2
commit
7b858c5a93
5 changed files with 60 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
|
@ -50,6 +51,8 @@ func main() {
|
|||
f.Bool("color", true, "Show colored output")
|
||||
f.Bool("debug", false, "Enable debug mode")
|
||||
|
||||
f.Bool("version", false, "Show version of doggo")
|
||||
|
||||
// Parse and Load Flags.
|
||||
err := f.Parse(os.Args[1:])
|
||||
if err != nil {
|
||||
|
@ -62,6 +65,12 @@ func main() {
|
|||
app.Logger.Exit(2)
|
||||
}
|
||||
|
||||
// If version flag is set, output version and quit.
|
||||
if k.Bool("version") {
|
||||
fmt.Printf("%s - %s\n", buildVersion, buildDate)
|
||||
app.Logger.Exit(0)
|
||||
}
|
||||
|
||||
// Set log level.
|
||||
if k.Bool("debug") {
|
||||
// Set logger level
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue