Skip to content

Commit bfbbb05

Browse files
committed
unison-manual.tex: document the assoc pathspec pattern
1 parent 3ec7adc commit bfbbb05

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/unison-manual.tex

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,20 @@
19111911
preferpartial = del Path prefix*.txt
19121912
preferpartial = Path prefix.txt
19131913
\end{verbatim}
1914+
\item
1915+
An associated string can also be defined and recorded without setting the
1916+
corresponding preference by an assoc pattern, that is any pattern prefixed by
1917+
\texttt{assoc} separated exactly by one space. Any (preceding or following)
1918+
(positive) pattern can set the preference independently without having to
1919+
specify an associated string.
1920+
1921+
For example one can define a generic merge command without enbaling the
1922+
\verb|merge| preference, then select some paths to merge without having to give
1923+
the merge command again and again:
1924+
\begin{verbatim}
1925+
merge = assoc Name *.txt -> mergecmd CURRENT1 CURRENT2
1926+
merge = Path prefix*.txt
1927+
\end{verbatim}
19141928
\end{itemize}
19151929
Some examples of path patterns appear in \sectionref{ignore}{Ignoring
19161930
Paths}.

0 commit comments

Comments
 (0)