made cli use $0 as reference for helptext

This commit is contained in:
endigma 2021-01-30 15:17:29 -04:00
parent 4d9e69e098
commit 823f678757

View File

@ -55,7 +55,7 @@ func main() {
case "info":
api.InitAPI()
if len(os.Args) <= 2 {
fmt.Println("Usage: r2go info <dependency string>")
fmt.Printf("Usage: %s info <dependency string>\n", os.Args[0])
} else {
var selectedmod api.Mod = api.GetModData(os.Args[2])
color.Cyan("Mod Info: %s", os.Args[2])
@ -123,8 +123,9 @@ func main() {
case "filter":
fmt.Println(tools.ExposeModString(os.Args[2]))
case "version", "ver", "v":
color.Magenta("> r2go", version)
fmt.Println(" > github.com/endigma442")
color.Magenta("> r2go")
fmt.Println(">", version)
fmt.Println("> git.cya.cx/endigma/r2mod-go")
case "search", "s", "find":
api.InitAPI()
@ -138,6 +139,6 @@ func main() {
fmt.Println(" -", mod.Target)
}
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])
}
}