Reorder lists
This commit is contained in:
parent
32384b9555
commit
504b3bf2c9
2 changed files with 8 additions and 8 deletions
|
@ -27,16 +27,16 @@ be omitted. Most attributes can be abbreviated as a single letter.
|
|||
|
||||
| Attribute | Meaning |
|
||||
| - | - |
|
||||
| `template`, `t` | Valid when the value matches a supported template processor. See the [Templates](/docs/templates) section for more details. |
|
||||
| `user`, `u` | Valid if the value matches the current user. Current user is calculated by running <code>id ‑u ‑n</code>. |
|
||||
| `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running <code>lsb_release ‑si</code> or inspecting <code>/etc/os-release</code> |
|
||||
| `distro_family`, `f` | Valid if the value matches the distro family. Distro family is calculated by inspecting the `ID_LIKE` line from <code>/etc/os-release</code> |
|
||||
| `os`, `o` | Valid if the value matches the OS. OS is calculated by running <code>uname ‑s</code>. <sup>*</sup> |
|
||||
| `arch`, `architecture`, `a` | Valid if the value matches the architecture. Architecture is calculated by running <code>uname ‑m</code>. |
|
||||
| `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using <code>yadm config local.class <class></code>. |
|
||||
| `hostname`, `h` | Valid if the value matches the short hostname. Hostname is calculated by running <code>uname ‑n</code>, and trimming off any domain. |
|
||||
| `default` | Valid when no other alternate is valid. |
|
||||
| `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running <code>lsb_release ‑si</code> or inspecting <code>/etc/os-release</code> |
|
||||
| `distro_family`, `f` | Valid if the value matches the distro family. Distro family is calculated by inspecting the `ID_LIKE` line from <code>/etc/os-release</code> |
|
||||
| `extension`, `e` | A special "condition" that doesn't affect the selection process. Its purpose is instead to allow the alternate file to end with a certain extension to e.g. make editors highlight the content properly. |
|
||||
| `hostname`, `h` | Valid if the value matches the short hostname. Hostname is calculated by running <code>uname ‑n</code>, and trimming off any domain. |
|
||||
| `os`, `o` | Valid if the value matches the OS. OS is calculated by running <code>uname ‑s</code>. <sup>*</sup> |
|
||||
| `template`, `t` | Valid when the value matches a supported template processor. See the [Templates](/docs/templates) section for more details. |
|
||||
| `user`, `u` | Valid if the value matches the current user. Current user is calculated by running <code>id ‑u ‑n</code>. |
|
||||
|
||||
<sub><sup>*
|
||||
The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux".
|
||||
|
|
|
@ -39,15 +39,15 @@ When template processors run, they will be provided the following set of data.
|
|||
|
||||
| Default (built-in) | Jinja or ESH | Description | Source |
|
||||
| - | - | - | - |
|
||||
| `yadm.arch` | `YADM_ARCH` | Architecture | <code>uname ‑m</code> |
|
||||
| `yadm.class` | `YADM_CLASS` | Last defined class | <code>yadm config local.class</code> |
|
||||
| `yadm.classes` | `YADM_CLASSES` | All classes | <code>yadm config ‑‑get‑all local.class</code> |
|
||||
| `yadm.distro` | `YADM_DISTRO` | Distribution | <code>lsb_release ‑si</code><br/>or <code>/etc/os-release</code> |
|
||||
| `yadm.distro_family` | `YADM_DISTRO_FAMILY` | Distribution Family | `ID_LIKE` from<code>/etc/os‑release</code> |
|
||||
| `yadm.hostname` | `YADM_HOSTNAME` | Hostname | <code>uname ‑n</code> (without domain) |
|
||||
| `yadm.os` | `YADM_OS` | Operating system | <code>uname ‑s</code> <sup>*</sup> |
|
||||
| `yadm.arch` | `YADM_ARCH` | Architecture | <code>uname ‑m</code> |
|
||||
| `yadm.user` | `YADM_USER` | Current user | <code>id ‑u ‑n</code> |
|
||||
| `yadm.source` | `YADM_SOURCE` | Template filename | (fully qualified path) |
|
||||
| `yadm.user` | `YADM_USER` | Current user | <code>id ‑u ‑n</code> |
|
||||
| `env.VAR` | | Env variables | Any VAR in the environment while yadm templates are processed |
|
||||
|
||||
<sub><sup>*
|
||||
|
|
Loading…
Reference in a new issue