chore(cmd): updates Shorts, and test expectations.
This commit is contained in:
parent
ef597c5f22
commit
9467675715
16 changed files with 60 additions and 49 deletions
|
|
@ -34,7 +34,7 @@ import (
|
|||
// delDbCmd represents the set command
|
||||
var delDbCmd = &cobra.Command{
|
||||
Use: "del-db DB",
|
||||
Short: "Delete a database.",
|
||||
Short: "Delete a database",
|
||||
Aliases: []string{"delete-db", "rm-db", "remove-db"},
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: delDb,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import (
|
|||
// delCmd represents the set command
|
||||
var delCmd = &cobra.Command{
|
||||
Use: "del KEY[@DB] [KEY[@DB] ...]",
|
||||
Short: "Delete one or more keys. Optionally specify a db.",
|
||||
Short: "Delete one or more keys",
|
||||
Aliases: []string{"delete", "rm", "remove"},
|
||||
Args: cobra.ArbitraryArgs,
|
||||
RunE: del,
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ import (
|
|||
// getCmd represents the get command
|
||||
var getCmd = &cobra.Command{
|
||||
Use: "get KEY[@DB]",
|
||||
Short: "Get a value for a key. Optionally specify a db.",
|
||||
Long: `Get a value for a key. Optionally specify a db.
|
||||
Short: "Get the value of a key",
|
||||
Long: `Get the value of a key. Optionally specify a db.
|
||||
|
||||
{{ .TEMPLATES }} can be filled by passing TEMPLATE=VALUE as an
|
||||
additional argument after the initial KEY being fetched.
|
||||
|
|
|
|||
|
|
@ -30,8 +30,13 @@ import (
|
|||
)
|
||||
|
||||
var gitCmd = &cobra.Command{
|
||||
Use: "git [args...]",
|
||||
Short: "Run git in the pda VCS repository",
|
||||
Use: "git [args...]",
|
||||
Short: "Run any arbitrary command. Use with caution.",
|
||||
Long: `Run any arbitrary command. Use with caution.
|
||||
|
||||
Be wary of how pda! version control operates before using this. Regular data is stored in "PDA_DATA/pda/stores" as a database; the Git repository is in "PDA_DATA/pda/vcs" and contains a replica of the database stored as plaintext.
|
||||
|
||||
The regular sync command (or auto-syncing) exports pda! data into plaintext in the Git repository. If you manually modify the repository without using the built-in commands, or exporting your data to the folder in the correct format first, you may desynchronize your repository.`,
|
||||
Args: cobra.ArbitraryArgs,
|
||||
DisableFlagParsing: true,
|
||||
SilenceUsage: true,
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import (
|
|||
|
||||
var initCmd = &cobra.Command{
|
||||
Use: "init [remote-url]",
|
||||
Short: "Initialise (or fetch) Git-backed version control.",
|
||||
Short: "Initialise pda! version control",
|
||||
SilenceUsage: true,
|
||||
Args: cobra.MaximumNArgs(1),
|
||||
RunE: vcsInit,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import (
|
|||
// delCmd represents the set command
|
||||
var listDbsCmd = &cobra.Command{
|
||||
Use: "list-dbs",
|
||||
Short: "List all dbs.",
|
||||
Short: "List all databases",
|
||||
Aliases: []string{"ls-dbs", "lsd"},
|
||||
Args: cobra.NoArgs,
|
||||
RunE: listDbs,
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import (
|
|||
|
||||
var listCmd = &cobra.Command{
|
||||
Use: "list [DB]",
|
||||
Short: "List the contents of a db.",
|
||||
Short: "List the contents of a database",
|
||||
Aliases: []string{"ls"},
|
||||
Args: cobra.MaximumNArgs(1),
|
||||
RunE: list,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import (
|
|||
// rootCmd represents the base command when called without any subcommands
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "pda",
|
||||
Short: "A key-value store.",
|
||||
Short: "A key-value store tool",
|
||||
Long: asciiArt,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue