* showing help by basic call
All checks were successful
Build and Test / build-test (1.23.4) (push) Successful in 1m37s

* autocompletion for exec
This commit is contained in:
Denys Seredenko
2025-02-18 19:34:15 +01:00
parent a21b9cfa84
commit 121c2505e6
5 changed files with 36 additions and 10 deletions

View File

@@ -14,15 +14,15 @@ import (
"os"
)
var validArgs = []string{"list", "replace", "add", "delete", "exec"}
var rootCmd = &cobra.Command{
Use: "ssh-hub",
Short: "ssh-hub is a simple SSH manager. Storing all your ssh commands and managing them",
Long: "ssh-hub was created in order to automatically manage ssh commands and different Groups.\n " +
"\tCreate groups based on projects, environments etc and add there your ssh commands.\n " +
"\tWe will carefully manage all known sessions and groups.",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Welcome to ssh-hub!")
},
ValidArgs: validArgs,
}
func Execute() {
@@ -72,13 +72,8 @@ ssh-hub
├── ssh - Execute an SSH command (with autocomplete)
├── add - Add a new command or group
│ ├── command - Save an SSH command
│ └── group - Create a group of commands
├── exec - Execute a saved command or group
├── remove - Remove a command or group
├── groups - Manage groups
│ ├── add - Add a command to a group
│ ├── remove - Remove a command from a group
│ └── list - List commands in a group
├── delete - Remove a command or group
├── autocomplete - Enable or generate shell autocompletion
└── help - Display help information for commands
*/