made cli use $0 as reference for helptext
This commit is contained in:
parent
4d9e69e098
commit
823f678757
9
main.go
9
main.go
@ -55,7 +55,7 @@ func main() {
|
|||||||
case "info":
|
case "info":
|
||||||
api.InitAPI()
|
api.InitAPI()
|
||||||
if len(os.Args) <= 2 {
|
if len(os.Args) <= 2 {
|
||||||
fmt.Println("Usage: r2go info <dependency string>")
|
fmt.Printf("Usage: %s info <dependency string>\n", os.Args[0])
|
||||||
} else {
|
} else {
|
||||||
var selectedmod api.Mod = api.GetModData(os.Args[2])
|
var selectedmod api.Mod = api.GetModData(os.Args[2])
|
||||||
color.Cyan("Mod Info: %s", os.Args[2])
|
color.Cyan("Mod Info: %s", os.Args[2])
|
||||||
@ -123,8 +123,9 @@ func main() {
|
|||||||
case "filter":
|
case "filter":
|
||||||
fmt.Println(tools.ExposeModString(os.Args[2]))
|
fmt.Println(tools.ExposeModString(os.Args[2]))
|
||||||
case "version", "ver", "v":
|
case "version", "ver", "v":
|
||||||
color.Magenta("> r2go", version)
|
color.Magenta("> r2go")
|
||||||
fmt.Println(" > github.com/endigma442")
|
fmt.Println(">", version)
|
||||||
|
fmt.Println("> git.cya.cx/endigma/r2mod-go")
|
||||||
case "search", "s", "find":
|
case "search", "s", "find":
|
||||||
api.InitAPI()
|
api.InitAPI()
|
||||||
|
|
||||||
@ -138,6 +139,6 @@ func main() {
|
|||||||
fmt.Println(" -", mod.Target)
|
fmt.Println(" -", mod.Target)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
fmt.Println("Unknown command, use 'r2go help' for a list of commands.")
|
fmt.Printf("Unknown command, use '%s help' for a list of commands.\n", os.Args[0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user