右键菜单添加meld

select_for_meld:

#!/bin/sh
quoted=$(echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | awk 'BEGIN { FS = "\n" } { printf "%s", $1 }' )
echo "$quoted" > $HOME/.meld/nautilus

compare_to_meld:

#!/bin/sh
arg1=$(cat $HOME/.meld/nautilus)
arg2=$(echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | awk 'BEGIN { FS = "\n" } { printf "%s", $1 }' )
if [ "$(arg1)" -eq "0" ];then
zenity --info --text "No files Selected!"
exit 1
fi
meld "$arg1" "$arg2"

 

把两个文件放入

home .gnome2 nautilus-scripts 下

 

 

 

posted @ 2014-04-03 10:25  xjadss  阅读(716)  评论(0编辑  收藏  举报