Skip to content

Commit

Permalink
docs: use consistent sessions subcommand in all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenmiller committed Jun 9, 2024
1 parent a32df81 commit ba2dd8c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_clear.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/sessions/clear/clear.manual.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/sessions/decrypttext/decryptText.manual.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
`,
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/sessions/encrypttext/encryptText.manual.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ba2dd8c

Please sign in to comment.