diff --git a/docs/go-c8y-cli/docs/concepts/sessions.md b/docs/go-c8y-cli/docs/concepts/sessions.md index 3233cc5b2..e27a5f133 100644 --- a/docs/go-c8y-cli/docs/concepts/sessions.md +++ b/docs/go-c8y-cli/docs/concepts/sessions.md @@ -94,7 +94,7 @@ You can also provide additional flags to set session, as these are passed direct If you wish to manage your sessions manually, then you can set the `C8Y_SESSION` environment variable to an existing json session file. - + ```bash export C8Y_SESSION=~/.cumulocity/my-settings01.json @@ -104,6 +104,10 @@ export C8Y_SESSION=~/.cumulocity/my-settings01.json $env:C8Y_SESSION = "~/.cumulocity/my-settings01.json" ``` +```powershell +$env:C8Y_SESSION = "~/.cumulocity/my-settings01.json" +``` + ### Session file format @@ -198,7 +202,7 @@ The following shows how the functions can be controlled via session settings: When the commands are disabled in the session settings, they can be temporarily activated on the console by using the following command: - + ```bash eval $( c8y settings update mode dev --shell auto ) @@ -208,6 +212,10 @@ eval $( c8y settings update mode dev --shell auto ) c8y settings update mode dev --shell auto | Out-String | Invoke-Expression ``` +```powershell +c8y settings update mode dev --shell auto | Out-String | Invoke-Expression +``` + @@ -215,7 +223,7 @@ The commands will remain enabled until the next time you call `set-session`. Afterwards you can disable them again using: - + ```bash eval $( c8y settings update mode prod --shell auto ) @@ -225,6 +233,10 @@ eval $( c8y settings update mode prod --shell auto ) c8y settings update mode prod --shell auto | Out-String | Invoke-Expression ``` +```powershell +c8y settings update mode prod --shell auto | Out-String | Invoke-Expression +``` + ## Using encryption in Cumulocity session files @@ -375,6 +387,13 @@ c8y settings list --select session.home $myhome = c8y settings list --select session.home --output csv ``` +```powershell +c8y settings list --select session.home + +# or if you want to write it to a variable +$myhome = c8y settings list --select session.home --output csv +``` + ```bash title="Output" @@ -393,7 +412,7 @@ vim ~/.cumulocity/my-manual-file.json ``` ```powershell -# using VSCode +# Using VSCode code ~/.cumulocity/my-manual-file.json ```