mirror of
https://github.com/TheLocehiliosan/yadm
synced 2025-06-04 00:23:58 +00:00
Updated docs for negation conditions
This commit is contained in:
parent
3adb8dd902
commit
e75c2e31a1
28
yadm.1
28
yadm.1
@ -475,9 +475,11 @@ commas.
|
||||
|
||||
Each condition is an attribute/value pair, separated by a period. Some
|
||||
conditions do not require a "value", and in that case, the period and value can
|
||||
be omitted. Most attributes can be abbreviated as a single letter.
|
||||
be omitted. Most attributes can be abbreviated as a single letter. Prefixing an
|
||||
attribute with "~" negates the condition, meaning the condition is considered
|
||||
only if the attribute/value pair evaluates to false.
|
||||
|
||||
<attribute>[.<value>]
|
||||
[~]<attribute>[.<value>]
|
||||
|
||||
.BR NOTE :
|
||||
Value is compared case-insensitive.
|
||||
@ -552,11 +554,12 @@ For all files managed by yadm's repository or listed in
|
||||
if they match this naming convention,
|
||||
symbolic links will be created for the most appropriate version.
|
||||
|
||||
The "most appropriate" version is determined by calculating a score for each
|
||||
version of a file. A template is always scored higher than any symlink
|
||||
condition. The number of conditions is the next largest factor in scoring.
|
||||
Files with more conditions will always be favored. Any invalid condition will
|
||||
disqualify that file completely.
|
||||
The "most appropriate" version is determined by calculating a score for each
|
||||
version of a file. A template is always scored higher than any symlink
|
||||
condition. The number of conditions is the next largest factor in scoring;
|
||||
files with more conditions will always be favored. Negative conditions (prefixed
|
||||
with "~") are scored only relative to the number of non-negated conditions.
|
||||
Any invalid condition will disqualify that file completely.
|
||||
|
||||
If you don't care to have all versions of alternates stored in the same
|
||||
directory as the generated symlink, you can place them in the
|
||||
@ -575,7 +578,7 @@ files are managed by yadm's repository:
|
||||
- $HOME/path/example.txt##os.Linux
|
||||
- $HOME/path/example.txt##os.Linux,hostname.host1
|
||||
- $HOME/path/example.txt##os.Linux,hostname.host2
|
||||
- $HOME/path/example.txt##~os.Linux,~os.Darwin,~os.SunOS
|
||||
- $HOME/path/example.txt##class.Work,~os.Darwin
|
||||
|
||||
If running on a Macbook named "host2",
|
||||
yadm will create a symbolic link which looks like this:
|
||||
@ -598,14 +601,15 @@ If running on a Solaris server, the link will use the default version:
|
||||
|
||||
.IR $HOME/path/example.txt " -> " $HOME/path/example.txt##default
|
||||
|
||||
If running on a system, with class set to "Work", the link will be:
|
||||
If running on a Macbook with class set to "Work", the link will be:
|
||||
|
||||
.IR $HOME/path/example.txt " -> " $HOME/path/example.txt##class.Work
|
||||
|
||||
Negative conditions are supported via the "~" prefix. If running within
|
||||
Windows Subsystem for Linux, where the os is reported as WSL, the link will be:
|
||||
Negative conditions are supported via the "~" prefix. If again running on a system
|
||||
with class set to "Work", but instead within Windows Subsystem for Linux, where the
|
||||
os is reported as WSL, the link will be:
|
||||
|
||||
.IR $HOME/path/example.txt " -> " $HOME/path/example.txt##~os.Linux,~os.Darwin,~os.SunOS
|
||||
.IR $HOME/path/example.txt " -> " $HOME/path/example.txt##class.Work,~os.Darwin
|
||||
|
||||
Negative conditions use the same weight which corresponds to the attached attribute.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user