Skip to content

Commit

Permalink
Merge pull request #4 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 0.0.3
  • Loading branch information
andyone authored Jul 5, 2021
2 parents c4df062 + aea8c95 commit beace89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Usage: scratch {options} template dir
Options
--no-color, -nc .. Disable colors in output
--help, -h ....... Show this help message
--version, -v .... Show version
--no-color, -nc Disable colors in output
--help, -h Show this help message
--version, -v Show version
Examples
Expand All @@ -71,7 +71,6 @@ Examples
scratch service $GOPATH/src/github.com/essentialkaos/myapp
Generate service blank files in sources directory
```

### Contributing
Expand Down
10 changes: 7 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

const (
APP = "scratch"
VER = "0.0.2"
VER = "0.0.3"
DESC = "Utility for generating blank files for apps and services"
)

Expand Down Expand Up @@ -70,6 +70,8 @@ func Init() {
os.Exit(1)
}

configureUI()

if options.Has(OPT_COMPLETION) {
os.Exit(genCompletion())
}
Expand All @@ -86,8 +88,6 @@ func Init() {
os.Exit(showUsage())
}

configureUI()

if len(args) < 2 {
listTemplates()
} else {
Expand All @@ -97,6 +97,10 @@ func Init() {

// configureUI configures UI
func configureUI() {
if options.GetB(OPT_NO_COLOR) {
fmtc.DisableColors = true
}

terminal.Prompt = "› "
}

Expand Down

0 comments on commit beace89

Please sign in to comment.