From fd047ee8463559e6548e2ad92a4a47720ba7437c Mon Sep 17 00:00:00 2001 From: Erik Flodin Date: Sun, 18 Oct 2020 21:40:54 +0200 Subject: [PATCH 1/3] Add space to match other lines in table --- _docs/060_alternates.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_docs/060_alternates.md b/_docs/060_alternates.md index 3212891..1e7cab4 100644 --- a/_docs/060_alternates.md +++ b/_docs/060_alternates.md @@ -27,13 +27,13 @@ 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.| +| `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 id ‑u ‑n. | | `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running lsb_release ‑si or inspecting /etc/os-release | | `os`, `o` | Valid if the value matches the OS. OS is calculated by running uname ‑s. * | | `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using yadm config local.class <class>. | -|`hostname`, `h`|Valid if the value matches the short hostname. Hostname is calculated by running `hostname`, and trimming off any domain.| -|`default`|Valid when no other alternate is valid.| +| `hostname`, `h` | Valid if the value matches the short hostname. Hostname is calculated by running `hostname`, and trimming off any domain. | +| `default` | Valid when no other alternate is valid. | * The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux". From 63a0bc583022bc4797653b9e8645b6824d349692 Mon Sep 17 00:00:00 2001 From: Erik Flodin Date: Sun, 18 Oct 2020 21:41:14 +0200 Subject: [PATCH 2/3] Add documentation for the extension condition See #257 --- _docs/060_alternates.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_docs/060_alternates.md b/_docs/060_alternates.md index 1e7cab4..611fdd2 100644 --- a/_docs/060_alternates.md +++ b/_docs/060_alternates.md @@ -34,6 +34,7 @@ be omitted. Most attributes can be abbreviated as a single letter. | `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using yadm config local.class <class>. | | `hostname`, `h` | Valid if the value matches the short hostname. Hostname is calculated by running `hostname`, and trimming off any domain. | | `default` | Valid when no other alternate is valid. | +| `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. | * The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux". From 891d6ca28f17d58808babd30d723a9942165c424 Mon Sep 17 00:00:00 2001 From: Erik Flodin Date: Sun, 18 Oct 2020 21:51:34 +0200 Subject: [PATCH 3/3] Correct the command used to determine hostname --- _docs/060_alternates.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_docs/060_alternates.md b/_docs/060_alternates.md index 611fdd2..f47a248 100644 --- a/_docs/060_alternates.md +++ b/_docs/060_alternates.md @@ -32,7 +32,7 @@ be omitted. Most attributes can be abbreviated as a single letter. | `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running lsb_release ‑si or inspecting /etc/os-release | | `os`, `o` | Valid if the value matches the OS. OS is calculated by running uname ‑s. * | | `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using yadm config local.class <class>. | -| `hostname`, `h` | Valid if the value matches the short hostname. Hostname is calculated by running `hostname`, and trimming off any domain. | +| `hostname`, `h` | Valid if the value matches the short hostname. Hostname is calculated by running uname ‑n, and trimming off any domain. | | `default` | Valid when no other alternate is valid. | | `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. |