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