From 2876bb7b0e38e1816a14ddefc8ba56336a0bdf2c Mon Sep 17 00:00:00 2001 From: Brian Boucheron Date: Thu, 30 Apr 2026 13:41:36 -0400 Subject: [PATCH] sshkeys: add example to ssh-key import help text The `doctl compute ssh-key import` subcommand had no Examples section in its help output. Add a concrete invocation showing a key name and --public-key-file flag, and expand the long description to mention both the argument and the --public-key-file flag, matching the style used for the neighbouring create subcommand. --- commands/sshkeys.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/sshkeys.go b/commands/sshkeys.go index d08cf9967..5a940179e 100644 --- a/commands/sshkeys.go +++ b/commands/sshkeys.go @@ -53,9 +53,12 @@ Note that creating a key will not add it to any Droplets.`, Writer, cmdSSHKeysImport := CmdBuilder(cmd, RunKeyImport, "import ", "Import an SSH key from your computer to your account", `Use this command to add a new SSH key to your account, using a local public key file. -Note that importing a key to your account will not add it to any Droplets`, Writer, +Specify a `+"`"+``+"`"+` for the key, and set the `+"`"+`--public-key-file`+"`"+` flag to the path of a local public key file, such as `+"`"+`~/.ssh/id_ed25519.pub`+"`"+`. + +Note that importing a key to your account will not add it to any Droplets.`, Writer, aliasOpt("i"), displayerType(&displayers.Key{})) AddStringFlag(cmdSSHKeysImport, doctl.ArgKeyPublicKeyFile, "", "", "Public key file", requiredOpt()) + cmdSSHKeysImport.Example = `doctl compute ssh-key import example-key --public-key-file ~/.ssh/id_ed25519.pub` cmdRunKeyDelete := CmdBuilder(cmd, RunKeyDelete, "delete ", "Permanently delete an SSH key from your account", `Use this command to permanently delete an SSH key from your account.