Reorder lists

This commit is contained in:
Tim Byrne 2022-02-21 13:17:16 -06:00
parent 32384b9555
commit 504b3bf2c9
No known key found for this signature in database
GPG Key ID: 14DB4FC2465A4B12
2 changed files with 8 additions and 8 deletions

View File

@ -27,16 +27,16 @@ be omitted. Most attributes can be abbreviated as a single letter.
| Attribute | Meaning | | 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&nbsp;&#8209;u&nbsp;&#8209;n</code>. |
| `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running <code>lsb_release&nbsp;&#8209;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&nbsp;&#8209;s</code>. <sup>*</sup> |
| `arch`, `architecture`, `a` | Valid if the value matches the architecture. Architecture is calculated by running <code>uname&nbsp;&#8209;m</code>. | | `arch`, `architecture`, `a` | Valid if the value matches the architecture. Architecture is calculated by running <code>uname&nbsp;&#8209;m</code>. |
| `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using <code>yadm&nbsp;config&nbsp;local.class&nbsp;&lt;class&gt;</code>. | | `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using <code>yadm&nbsp;config&nbsp;local.class&nbsp;&lt;class&gt;</code>. |
| `hostname`, `h` | Valid if the value matches the short hostname. Hostname is calculated by running <code>uname&nbsp;&#8209;n</code>, and trimming off any domain. |
| `default` | Valid when no other alternate is valid. | | `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&nbsp;&#8209;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. | | `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&nbsp;&#8209;n</code>, and trimming off any domain. |
| `os`, `o` | Valid if the value matches the OS. OS is calculated by running <code>uname&nbsp;&#8209;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&nbsp;&#8209;u&nbsp;&#8209;n</code>. |
<sub><sup>* <sub><sup>*
The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux". The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux".

View File

@ -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 | | Default (built-in) | Jinja or ESH | Description | Source |
| - | - | - | - | | - | - | - | - |
| `yadm.arch` | `YADM_ARCH` | Architecture | <code>uname&nbsp;&#8209;m</code> |
| `yadm.class` | `YADM_CLASS` | Last defined class | <code>yadm&nbsp;config&nbsp;local.class</code> | | `yadm.class` | `YADM_CLASS` | Last defined class | <code>yadm&nbsp;config&nbsp;local.class</code> |
| `yadm.classes` | `YADM_CLASSES` | All classes | <code>yadm&nbsp;config &#8209;&#8209;get&#8209;all&nbsp;local.class</code> | | `yadm.classes` | `YADM_CLASSES` | All classes | <code>yadm&nbsp;config &#8209;&#8209;get&#8209;all&nbsp;local.class</code> |
| `yadm.distro` | `YADM_DISTRO` | Distribution | <code>lsb_release&nbsp;&#8209;si</code><br/>or <code>/etc/os-release</code> | | `yadm.distro` | `YADM_DISTRO` | Distribution | <code>lsb_release&nbsp;&#8209;si</code><br/>or <code>/etc/os-release</code> |
| `yadm.distro_family` | `YADM_DISTRO_FAMILY` | Distribution Family | `ID_LIKE` from<code>/etc/os&#8209;release</code> | | `yadm.distro_family` | `YADM_DISTRO_FAMILY` | Distribution Family | `ID_LIKE` from<code>/etc/os&#8209;release</code> |
| `yadm.hostname` | `YADM_HOSTNAME` | Hostname | <code>uname&nbsp;&#8209;n</code> (without domain) | | `yadm.hostname` | `YADM_HOSTNAME` | Hostname | <code>uname&nbsp;&#8209;n</code> (without domain) |
| `yadm.os` | `YADM_OS` | Operating system | <code>uname&nbsp;&#8209;s</code> <sup>*</sup> | | `yadm.os` | `YADM_OS` | Operating system | <code>uname&nbsp;&#8209;s</code> <sup>*</sup> |
| `yadm.arch` | `YADM_ARCH` | Architecture | <code>uname&nbsp;&#8209;m</code> |
| `yadm.user` | `YADM_USER` | Current user | <code>id&nbsp;&#8209;u&nbsp;&#8209;n</code> |
| `yadm.source` | `YADM_SOURCE` | Template filename | (fully qualified path) | | `yadm.source` | `YADM_SOURCE` | Template filename | (fully qualified path) |
| `yadm.user` | `YADM_USER` | Current user | <code>id&nbsp;&#8209;u&nbsp;&#8209;n</code> |
| `env.VAR` | | Env variables | Any VAR in the environment while yadm templates are processed | | `env.VAR` | | Env variables | Any VAR in the environment while yadm templates are processed |
<sub><sup>* <sub><sup>*