从命令行开始超越比较 [英] Starting Beyond Compare from the Command Line

查看:47
本文介绍了从命令行开始超越比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在以下位置安装了Beyond Compare 3;

I have Beyond Compare 3 installed at;

"C:\Program Files\Beyond Compare 3\BCompare.exe"

和Cygwin;

"C:\Cygwin\bin\bash.exe"

我想要的是能够使用命令;

What I would like is to be able to use a command such as;

diff <file1> <file2>

进入Cygwin外壳,并让该外壳派生一个进程,以比较方式打开两个文件.

into the Cygwin shell and to have the shell fork a process opening the two files in beyond compare.

我查看了超出支持页面" ,但是我恐怕对我来说太简短了.我试图逐字复制文本(从路径到可执行文件)无济于事;

I looked at the Beyond Compare Support Page but I'm afraid It was too brief for me. I tried copying the text verbatim (apart from path to executable) to no avail;

Instead of using a batch file, create a file named "bc.sh" with the following line:
"$(cygpath 'C:\Progra~1\Beyond~1\bcomp.exe')" `cygpath -w "$6"` `cygpath -w "$7"` /title1="$3" /title2="$5" /readonly 

我应该替换cygpath吗?在命令行上输入脚本名称时,出现找不到命令"错误.

Was I supposed to replace cygpath? I get a 'Command not found' error when I enter the name of the script on the command line.

gavina@whwgavina1 /cygdrive
$ "C:\Documents and Settings\gavina\Desktop\bc.sh"
bash: C:\Documents and Settings\gavina\Desktop\bc.sh: command not found

有没有人像我所描述的那样超越比较"?在Windows环境中甚至可能吗?

Does anyone have Beyond Compare working as I have described? Is this even possible in a Windows environment?

提前谢谢!

推荐答案

在Cygwin内部,文件系统更像是Unix.cygpath组件在那里,是因为驱动器的根出现在路径中的其他位置."C:\"对Cygwin毫无意义,它认为'/'是根目录,您的驱动器必须从那里开始,因此cygpath扩展.另外,请尝试使用8.3表单,例如从引用的页面开始:

Inside of Cygwin the filesystem is more like unix. The cygpath component is there because the root of the drive appears in a different place in the path. "C:\" doesn't mean anything to Cygwin, it considers '/' to be the root and your drives have to start from there, hence the cygpath expansion. Also, try using the 8.3 form like from the referenced page:

"$(cygpath'C:\ Progra〜1 \ Beyond〜1 \ bcomp.exe')"

"$(cygpath 'C:\Progra~1\Beyond~1\bcomp.exe')"

这篇关于从命令行开始超越比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆