From ba2dd8cbc63bd11b2e0ba82682e19d03444190a0 Mon Sep 17 00:00:00 2001 From: reubenmiller Date: Sun, 9 Jun 2024 14:24:06 +0200 Subject: [PATCH] docs: use consistent sessions subcommand in all examples --- docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_clear.md | 4 ++-- .../docs/cli/c8y/sessions/c8y_sessions_decryptText.md | 4 ++-- .../docs/cli/c8y/sessions/c8y_sessions_encryptText.md | 4 ++-- pkg/cmd/sessions/clear/clear.manual.go | 4 ++-- pkg/cmd/sessions/decrypttext/decryptText.manual.go | 4 ++-- pkg/cmd/sessions/encrypttext/encryptText.manual.go | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_clear.md b/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_clear.md index 916d70734..43072dd15 100644 --- a/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_clear.md +++ b/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_clear.md @@ -16,12 +16,12 @@ c8y sessions clear [flags] ``` ### Example 1: Clear session in bash -$ eval $(c8y session clear) +$ eval $(c8y sessions clear) Clear the current session ## Example 2: Clear session in fish -$ c8y session clear | source +$ c8y sessions clear | source ``` diff --git a/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_decryptText.md b/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_decryptText.md index 60a71ea1a..a5b7aea4d 100644 --- a/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_decryptText.md +++ b/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_decryptText.md @@ -17,12 +17,12 @@ c8y sessions decryptText [flags] ``` Example 1: -c8y session decryptText --text "{encrypted}asdfasdfasdfasdfasdf" +c8y sessions decryptText --text "{encrypted}asdfasdfasdfasdfasdf" Encrypt the text "Hello World". You will be prompted for the passphrase to encrypt the data. Example 2: -c8y session encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters" +c8y sessions encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters" Encrypt the text "Hello World", the text will be encrypted using the given passphrase (without being prompted) diff --git a/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_encryptText.md b/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_encryptText.md index 5e8b9fbae..dd77385de 100644 --- a/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_encryptText.md +++ b/docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_encryptText.md @@ -18,13 +18,13 @@ c8y sessions encryptText [flags] Example 1: Encrypt the text "Hello World". You will be prompted for the passphrase to encrypt the data. -> c8y session encryptText --text "Hello World" +> c8y sessions encryptText --text "Hello World" Enter password 🔒: [input is hidden] Password: {encrypted}ec5b837a03408ffb731307584eac40ac047989a002951e4b7139fa60189e504b6840bc027cece28b3f36717839d96af1c5dba8c850b9a9079846066ee1596cc8d26f4138f76ce3 Example 2: Encrypt the text "Hello World", the text will be encrypted using the given passphrase (without being prompted) -> c8y session encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters" +> c8y sessions encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters" Password: {encrypted}ec5b837a03408ffb731307584eac40ac047989a002951e4b7139fa60189e504b6840bc027cece28b3f36717839d96af1c5dba8c850b9a9079846066ee1596cc8d26f4138f76ce3 ``` diff --git a/pkg/cmd/sessions/clear/clear.manual.go b/pkg/cmd/sessions/clear/clear.manual.go index d24da6c86..448a82081 100644 --- a/pkg/cmd/sessions/clear/clear.manual.go +++ b/pkg/cmd/sessions/clear/clear.manual.go @@ -34,12 +34,12 @@ func NewCmdClearSession(f *cmdutil.Factory) *CmdClearSession { Long: `Clear the current session by returning all the environment variables which should be unset via a shell snippet`, Example: heredoc.Doc(` ### Example 1: Clear session in bash -$ eval $(c8y session clear) +$ eval $(c8y sessions clear) Clear the current session ## Example 2: Clear session in fish -$ c8y session clear | source +$ c8y sessions clear | source `), RunE: ccmd.RunE, } diff --git a/pkg/cmd/sessions/decrypttext/decryptText.manual.go b/pkg/cmd/sessions/decrypttext/decryptText.manual.go index 35d01968e..9b4479224 100644 --- a/pkg/cmd/sessions/decrypttext/decryptText.manual.go +++ b/pkg/cmd/sessions/decrypttext/decryptText.manual.go @@ -28,12 +28,12 @@ func NewCmdDecryptText(f *cmdutil.Factory) *CmdDecryptText { Long: `Decrypt text based on the same encryption used to store sensitive data a cumulocity session`, Example: ` Example 1: -c8y session decryptText --text "{encrypted}asdfasdfasdfasdfasdf" +c8y sessions decryptText --text "{encrypted}asdfasdfasdfasdfasdf" Encrypt the text "Hello World". You will be prompted for the passphrase to encrypt the data. Example 2: -c8y session encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters" +c8y sessions encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters" Encrypt the text "Hello World", the text will be encrypted using the given passphrase (without being prompted) `, diff --git a/pkg/cmd/sessions/encrypttext/encryptText.manual.go b/pkg/cmd/sessions/encrypttext/encryptText.manual.go index f18676c16..208dd6914 100644 --- a/pkg/cmd/sessions/encrypttext/encryptText.manual.go +++ b/pkg/cmd/sessions/encrypttext/encryptText.manual.go @@ -30,13 +30,13 @@ func NewCmdEncryptText(f *cmdutil.Factory) *CmdEncryptText { Example: ` Example 1: Encrypt the text "Hello World". You will be prompted for the passphrase to encrypt the data. -> c8y session encryptText --text "Hello World" +> c8y sessions encryptText --text "Hello World" Enter password 🔒: [input is hidden] Password: {encrypted}ec5b837a03408ffb731307584eac40ac047989a002951e4b7139fa60189e504b6840bc027cece28b3f36717839d96af1c5dba8c850b9a9079846066ee1596cc8d26f4138f76ce3 Example 2: Encrypt the text "Hello World", the text will be encrypted using the given passphrase (without being prompted) -> c8y session encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters" +> c8y sessions encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters" Password: {encrypted}ec5b837a03408ffb731307584eac40ac047989a002951e4b7139fa60189e504b6840bc027cece28b3f36717839d96af1c5dba8c850b9a9079846066ee1596cc8d26f4138f76ce3 `, RunE: ccmd.RunE,