Ben*_*ale 5 command-line unison
交互式unison
命令行提供以下帮助:
Commands:
<ret> or f or <spc> follow unison's recommendation (if any)
n or j go to the next item
p or b or k go back to previous item
<del> or <bsp> revert then go back to previous item
0 go to the start of the list
9 go to the end of the list
5 go forward to the middle of the following items
6 go backward to the middle of the preceding items
R reverse the list of paths
d show differences (curr or match)
x show details (curr or match)
L list all (or matching) following changes tersely
l list all (or matching) following changes with details
A or * match all the following
1 match all the following that propagate from local to saunterblugget
2 match all the following that propagate from saunterblugget to local
C match all the following conflicts
P or = match all the following with only props changes
M match all the following merges
X or ! invert the matching condition
& and the last two matching conditions
| or the last two matching conditions
D or _ delete/pop the active matching condition
U or $ unmatch (select current)
r or u revert to unison's default recommendation (curr or match)
m merge the versions (curr or match)
> or . propagate from from local to saunterblugget (curr or match)
< or , propagate from from saunterblugget to local (curr or match)
] or " resolve conflicts in favor of the newer (curr or match)
[ or ' resolve conflicts in favor of the older (curr or match)
c resolve conflicts in favor of changed (curr or match)
i invert direction of propagation (curr or match)
/ or : skip (curr or match)
% skip all the following
- skip and discard for this session (curr or match)
+ skip and discard all the following
I ignore this path permanently
E permanently ignore files with this extension
N permanently ignore paths ending with this name
s stop reconciling and go to the proceed menu
g proceed immediately to propagating changes
q exit unison without propagating any changes
Run Code Online (Sandbox Code Playgroud)
对我来说,这意味着可以在命令行上指示unison
查找与某些条件匹配的所有文件并对它们执行操作,例如跳过它们或遵循unison
建议。
unison的文档提到可以提供一个匹配某些路径的条件,并执行诸如首先或最后列出所有匹配文件之类的操作。该文档没有讨论使用A
、&
或 等命令操作此类条件|
。其他文档来源(例如wiki和github 项目)似乎也没有提供有关此问题的帮助。
我的问题是有人可以解释如何使用命令行“match”命令吗?
我还想了解以下内容:
命令行文档中的“匹配”是否指的是文档中提到的相同“匹配条件”?如果不是,如何产生一个条件来匹配更改?如何选择匹配条件并在命令行上操作它们?
我认为这些工作方式与您\xe2\x80\x99d 期望的方式相同,只是\xe2\x80\x99s 没有明显的反馈表明您的操作有任何效果。
\n我认为关键是L
列出待更改的命令。
一开始L
可能会显示一长串带有问号的更改:
props <-?-> props foo.txt\nprops <-?-> props bar.txt\n
Run Code Online (Sandbox Code Playgroud)\n现在,如果我尝试使用match
基于帮助摘要的内容,例如选择仅更改道具的所有文件并从左侧应用,则看起来什么也没有发生:
props <-?-> props [] P\n Enabling matching condition\nprops <-?-> props [] >\nprops <-?-> props [] $\n Disabling matching condition\n
Run Code Online (Sandbox Code Playgroud)\n但是如果我再次列出文件,L
我可以看到一堆问号消失了,因为请求的更改已经设置:
props ====> props foo.txt\nprops ====> props bar.txt\n
Run Code Online (Sandbox Code Playgroud)\n然后您可以按g
应用更改。不过,用户界面对我来说确实看起来很尴尬,也许我缺少了一些东西,但它似乎仍然提示您输入您已经告诉它如何处理的所有文件。一种合理的工作流程:应用匹配内容后运行 unison g
\xe2\x80\x94it\xe2\x80\x99ll 跳过所有有冲突的文件\xe2\x80\x94然后再次运行 unison 以仅提示需要帮助的剩余文件和。