Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 04e18514a5 | |||
| 479204cb42 |
@@ -82,7 +82,7 @@ Command: kill %s
|
||||
```
|
||||
```bash
|
||||
#runs the 'kill' command on 'player'
|
||||
mctl command run placeholder player
|
||||
mctl run placeholder player
|
||||
```
|
||||
Running the placeholder command with the arg 'player' will run 'kill player' on the server
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
|
||||
var addCmd = &cobra.Command{
|
||||
Use: "add",
|
||||
Aliases: []string{"a"},
|
||||
Example: "mctl command add",
|
||||
Short: "Saves a new command to the database",
|
||||
SilenceUsage: true,
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
// CommandCmd is such a cool name lol
|
||||
var CommandCmd = &cobra.Command{
|
||||
Use: "command",
|
||||
Aliases: []string{"c"},
|
||||
Example: "mctl command <subcommand>",
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
var viewCmd = &cobra.Command{
|
||||
Use: "view",
|
||||
Aliases: []string{"v"},
|
||||
Example: "mctl command view",
|
||||
Short: "view all saved commands",
|
||||
SilenceUsage: true,
|
||||
|
||||
@@ -16,7 +16,7 @@ var rootCmd = &cobra.Command{
|
||||
Use: "mctl",
|
||||
Short: "A remote console client",
|
||||
Long: `mctl is a terminal-friendly remote console client made to manage game servers.`,
|
||||
Version: "v0.5.1",
|
||||
Version: "v0.7.1",
|
||||
}
|
||||
|
||||
// Execute adds all child commands to the root command and sets flags appropriately.
|
||||
|
||||
@@ -20,6 +20,7 @@ var (
|
||||
|
||||
var runCmd = &cobra.Command{
|
||||
Use: "run",
|
||||
Aliases: []string{"r"},
|
||||
Example: "mctl run -s <server> <command> args...",
|
||||
Short: "Runs a saved command on a server",
|
||||
Long: `Runs the named command with the provided args on the default/active server unless -s is specified`,
|
||||
|
||||
@@ -18,6 +18,7 @@ import (
|
||||
|
||||
var addCmd = &cobra.Command{
|
||||
Use: "add",
|
||||
Aliases: []string{"a"},
|
||||
Example: "mctl server add",
|
||||
Short: "Saves a new server configuration",
|
||||
Long: `Saves server address, alias, port, and password to the database.`,
|
||||
|
||||
@@ -16,6 +16,7 @@ const (
|
||||
|
||||
var ServerCmd = &cobra.Command{
|
||||
Use: "server",
|
||||
Aliases: []string{"s"},
|
||||
Example: "mctl server <subcommand>",
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
|
||||
var updateCmd = &cobra.Command{
|
||||
Use: "update",
|
||||
Aliases: []string{"u"},
|
||||
Example: "mctl server update <name>",
|
||||
Short: "updates a saved servers password in the database",
|
||||
SilenceUsage: true,
|
||||
|
||||
@@ -15,6 +15,7 @@ var decode bool
|
||||
|
||||
var viewCmd = &cobra.Command{
|
||||
Use: "view",
|
||||
Aliases: []string{"v"},
|
||||
Example: "mctl server view",
|
||||
Short: "view all saved servers",
|
||||
SilenceUsage: true,
|
||||
|
||||
Reference in New Issue
Block a user