aaaa55424ad7c440506024fac86927fc9916348f

Author
sed-i <82407168+sed-i@users.noreply.github.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

refactor(juju)!: use the jsh prefix for `juju show-*` commands (#10426)

BREAKING CHANGE: some aliases have been renamed to be consistent with the rest.
Mainly, aliases for `juju show-` commands are renamed to `jsh*`. This also means
that `jsh` and `jshc` have been renamed to `jssh` and `jsshc`. Have a look at the
README for the complete alias changes.

Diff

 1diff --git a/plugins/juju/README.md b/plugins/juju/README.md
 2index 918c08de5e6a9778c831cc695f7159ab2f99a693..f0c65309c9f13d25d48e2e256e521b8683c25002 100644
 3--- a/plugins/juju/README.md
 4+++ b/plugins/juju/README.md
 5@@ -15,6 +15,7 @@ Naming convention:
 6 
 7 - `!` suffix: `--force --no-wait -y`.
 8 - `ds` suffix: `--destroy-storage`.
 9+- `jsh` prefix means `juju show-*`.
10 
11 ### General
12 
13@@ -26,7 +27,7 @@ Naming convention:
14 | `jdl`   | `juju debug-log --ms`                       | Display log, with millisecond resolution               |
15 | `jdlr`  | `juju debug-log --ms --replay`              | Replay entire log                                      |
16 | `jh`    | `juju help`                                 | Show help on a command or other topic                  |
17-| `jssl`  | `juju show-status-log`                      | Output past statuses for the specified entity          |
18+| `jshsl` | `juju show-status-log`                      | Output past statuses for the specified entity          |
19 | `jstj`  | `juju status --format=json`                 | Show status in json format (more detailed)             |
20 | `jst`   | `juju status --relations --color`           | Show status, including relations, in color             |
21 | `jsts`  | `juju status --relations --storage --color` | Show status, including relations and storage, in color |
22@@ -53,6 +54,7 @@ Naming convention:
23 | `jdcds`  | `juju destroy-controller --destroy-all-models --destroy-storage`                      | Destroy a controller and associated storage                       |
24 | `jdcds!` | `juju destroy-controller --destroy-all-models --destroy-storage --force --no-wait -y` | Destroy a controller and associated storage                       |
25 | `jkc`    | `juju kill-controller -y -t 0`                                                        | Forcibly terminate all associated resources for a Juju controller |
26+| `jshc`   | `juju show-controller`                                                                | Shows detailed information of a controller                    |
27 | `jsw`    | `juju switch`                                                                         | Select or identify the current controller and model               |
28 
29 ### Model
30@@ -84,9 +86,9 @@ Naming convention:
31 | `jrmds!` | `juju remove-application --destroy-storage --force --no-wait` | Remove application forcefully, destroying attached storage                |
32 | `jrp`    | `juju refresh --path`                                         | Upgrade charm from local charm file                                       |
33 | `jsa`    | `juju scale-application`                                      | Set the desired number of application units                               |
34-| `jsh`    | `juju ssh`                                                    | Initiate an SSH session or execute a command on a Juju target             |
35-| `jshc`   | `juju ssh --container`                                        | Initiate an SSH session or execute a command on a given container         |
36-| `jsu`    | `juju show-unit`                                              | Displays information about a unit                                         |
37+| `jssh`   | `juju ssh`                                                    | Initiate an SSH session or execute a command on a Juju target             |
38+| `jsshc`  | `juju ssh --container`                                        | Initiate an SSH session or execute a command on a given container         |
39+| `jshu`   | `juju show-unit`                                              | Displays information about a unit                                         |
40 
41 ### Storage
42 
43diff --git a/plugins/juju/juju.plugin.zsh b/plugins/juju/juju.plugin.zsh
44index 408692dc783e8c069fd7eb7dd779ca7eaf58af78..be8a2c7aecbf4ca2521871c238c441de10b4adb9 100644
45--- a/plugins/juju/juju.plugin.zsh
46+++ b/plugins/juju/juju.plugin.zsh
47@@ -16,6 +16,7 @@ unset completion_file
48 # Generally,                                                 #
49 #   - `!` means --force --no-wait -y                         #
50 #   - `ds` suffix means --destroy-storage                    #
51+#   - `jsh` prefix means juju show-*                         #
52 # ---------------------------------------------------------- #
53 alias j="juju"
54 alias jam="juju add-model --config logging-config=\"<root>=WARNING; unit=DEBUG\"\
55@@ -65,14 +66,16 @@ alias jrp='juju refresh --path'
56 alias jrs='juju remove-storage'
57 alias 'jrs!'='juju remove-storage --force'
58 alias jsa='juju scale-application'
59-alias jsh='juju ssh'
60-alias jshc='juju ssh --container'
61+alias jsha='juju show-application'
62+alias jshc='juju show-controller'
63 alias jshm='juju show-model'
64-alias jssl='juju show-status-log'
65+alias jshsl='juju show-status-log'
66+alias jshu='juju show-unit'
67+alias jssh='juju ssh'
68+alias jsshc='juju ssh --container'
69 alias jstj='juju status --format=json'
70 alias jst='juju status --relations --color'
71 alias jsts='juju status --relations --storage --color'
72-alias jsu='juju show-unit'
73 alias jsw='juju switch'
74 
75 # ---------------------------------------------------------- #