Beyond Compare安装和相关配置
Linux下安装beyond compare 4(二进制比较)
官网下载:https://www.scootersoftware.com/download.php
Debian系选择Linux下的Debian格式,32还是64位根据自己的系统下载。
安装:sudo dpkg -i 安装包名.deb
破解: 在本地创建一个每次启动bcompare就自动清除bcompare使用日志的脚本 sudo nvim /usr/local/bin/clear_bc_reg.sh
将下面的内容复制进去
#!/bin/sh
rm -rf ~/.config/bcompare/registry.dat
bcompare
sudo chmod 777 /usr/local/bin/clear_bc_reg.sh
创建一个快捷命令(软连接)(我这里设置的是bcp,可以根据自己的习惯设置。) sudo ln -s /usr/local/bin/clear_bc_reg.sh /usr/local/bin/bc
在命令行中输入bcp就可以启动bcompare软件了
可能有用:https://gist.github.com/rise-worlds/5a5917780663aada8028f96b15057a67?permalink_comment_id=3745352
beyond compare添加右键
deepin linux ,dde 桌面
beyond compare:官网下载,Debian格式
创建几个脚本
cd .config/bcompare
mkdir right_key
cd right_key
touch bcomparelater
touch bcomparewith
touch bcomparediff
chmod +x bcomparelater bcomparewith bcomparediff
bcomparediff:
#!/bin/bash
#选中两个文件才比较
TMP_FILE="/home/modao/.config/bcompare/right_key/bcomparetxt"
old=""
new=""
echo "meld $@" > $TMP_FILE
for i in $@
do
echo $i >> $TMP_FILE
# tmp=$(echo $i | grep "old")
# if [[ ${tmp} != "" ]]
# then
# old=$i
# fi
# tmp=$(echo $i | grep "new")
# if [[ ${tmp} != "" ]]
# then
# new=$i
# fi
if [[ $i =~ "old" ]]
then
old=$i
fi
if [[ $i =~ "new" ]]
then
new=$i
fi
done
if [ $# -eq 2 ]
then
if [[ $old != "" && $new != "" ]]
then
bcompare $old $new
else
bcompare $1 $2
fi
fi
bcomparelater:
#!/bin/sh
comparefile=$(echo $@ | awk 'BEGIN { FS = "\n" } { printf "\"%s\" ",$1 }' | sed -e s#\"\"##)
echo $comparefile > /home/modao/.config/bcompare/right_key/bcomparetxt
bcomparewith:
#!/bin/sh
arg2=$(cat /home/modao/.config/bcompare/right_key/bcomparetxt)
arg1=$(echo $@ | awk 'BEGIN { FS = "\n" } { printf "\"%s\" ",$1 }' | sed -e s#\"\"##)
bcompare $arg2 $arg1
创建软连接
sudo ln -s ~/.config/bcompare/right_key/bcomparelater /usr/local/bin/bcomparelater
sudo ln -s ~/.config/bcompare/right_key/bcomparewith /usr/local/bin/bcomparewith
sudo ln -s ~/.config/bcompare/right_key/bcomparediff /usr/local/bin/bcomparediff
创建右键连接
sudo touch /usr/share/deepin/dde-file-manager/oem-menuextensions/open-by-bcomparelater.desktop
sudo touch /usr/share/deepin/dde-file-manager/oem-menuextensions/open-by-bcomparewith.desktop
sudo touch /usr/share/deepin/dde-file-manager/oem-menuextensions/open-by-bcomparediff.desktop
open-by-bcomparelater.desktop :
[Desktop Entry]
Name=晚点比较
Type=Application
X-DFM-MenuTypes=SingleFile;SingleDir
Exec=bcomparelater %u
Icon=bcompare
open-by-bcomparewith.desktop :
[Desktop Entry]
Name=现在比较
Type=Application
X-DFM-MenuTypes=SingleFile;SingleDir
Exec=bcomparewith %u
Icon=bcompare
open-by-bcomparediff.desktop :
[Desktop Entry]
Name=比较差异
Type=Application
X-DFM-MenuTypes=MultiFileDirs
Exec=bcomparediff %U
Icon=bcompare
https://bbs.chinauos.com/en/post/12984
beyond compare设置对齐方式
会话->会话设置
选择对齐方式,底部可将该设置保存到全局(默认)