[mike@maginot]
This commit is contained in:
@@ -383,6 +383,8 @@ usage: dx [-n] [-d] [-r] [-t N] [path]
|
||||
--bar / --no-bar share bar and percentage (default: when colorized)
|
||||
--color=auto|always|never colorize output (default auto)
|
||||
--version
|
||||
--check-update look for a newer release
|
||||
--update download and install the newest release
|
||||
`, version)
|
||||
}
|
||||
|
||||
@@ -412,6 +414,18 @@ func main() {
|
||||
case a == "--version":
|
||||
fmt.Printf("dx %s\n", version)
|
||||
return
|
||||
case a == "--update":
|
||||
if err := selfUpdate.install(os.Stdout); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "dx: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return
|
||||
case a == "--check-update":
|
||||
if err := selfUpdate.check(os.Stdout); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "dx: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return
|
||||
case a == "--number":
|
||||
o.byCount = true
|
||||
case a == "--dirs":
|
||||
|
||||
Reference in New Issue
Block a user