5c4f27b7166360bd23709f24642b247eac30a147

Author
PascalKont <pascal@kontschan.de>
Committer
GitHub <noreply@github.com>
Date

Message

feat(molecule): introduce molecule aliases (#13594)

Diff

 1diff --git a/plugins/molecule/README.md b/plugins/molecule/README.md
 2index 27b21f9414b486831cf9646a5ea29d413b812c9b..5c447662674538e3f5252a45132f69311dcb9044 100644
 3--- a/plugins/molecule/README.md
 4+++ b/plugins/molecule/README.md
 5@@ -1,9 +1,20 @@
 6 # Molecule plugin
 7 
 8-This plugin adds completion for [Molecule](https://ansible.readthedocs.io/projects/molecule/), the project designed to aid in the development and testing of Ansible roles..
 9+This plugin adds aliases and completion for [Molecule](https://ansible.readthedocs.io/projects/molecule/), the
10+project designed to aid in the development and testing of Ansible roles..
11 
12 To use it, add `molecule` to the plugins array in your zshrc file:
13 
14 ```zsh
15 plugins=(... molecule)
16 ```
17+
18+## Aliases
19+
20+| Alias | Command           | Description                                                                        |
21+| :---- | :---------------- | ---------------------------------------------------------------------------------- |
22+| mol   | molecule          | Molecule aids in the development and testing of Ansible roles.                     |
23+| mcr   | molecule create   | Use the provisioner to start the instances.                                        |
24+| mcon  | molecule converge | Use the provisioner to configure instances (dependency, create, prepare converge). |
25+| mls   | molecule list     | List status of instances.                                                          |
26+| mvf   | molecule verify   | Run automated tests against instances.                                             |
27diff --git a/plugins/molecule/molecule.plugin.zsh b/plugins/molecule/molecule.plugin.zsh
28index 65ba85e64103fd8dc88f0107dfce37840de05bcf..cee25ab03cf71243c46031c92002c5b261a35a56 100644
29--- a/plugins/molecule/molecule.plugin.zsh
30+++ b/plugins/molecule/molecule.plugin.zsh
31@@ -12,3 +12,11 @@ if [[ ! -f "$ZSH_CACHE_DIR/completions/_molecule" ]]; then
32 fi
33 
34 _MOLECULE_COMPLETE=zsh_source molecule >| "$ZSH_CACHE_DIR/completions/_molecule" &|
35+
36+# Alias
37+# molecule: https://docs.ansible.com/projects/molecule/
38+alias mol='molecule'
39+alias mcr='molecule create'
40+alias mcon='molecule converge'
41+alias mls='molecule list'
42+alias mvf='molecule verify'