Skip to content

Instantly share code, notes, and snippets.

@toaomatis
Created August 1, 2012 09:59
Show Gist options
  • Save toaomatis/3225571 to your computer and use it in GitHub Desktop.
Save toaomatis/3225571 to your computer and use it in GitHub Desktop.
A simple nautilus script that opens meld with the selected (0 to 3) files of folders in diff view
#!/bin/bash
command -v meld >/dev/null 2>&1 || { echo >&2 "I require meld but it's not installed. Aborting."; exit 1; }
if [ -n "$3" ]
then
## Third argument is set
meld "$1" "$2" "$3"
elif [ -n "$2" ]
then
## Second argument is set
meld "$1" "$2"
elif [ -n "$1" ]
then
## First argument is set
meld "$1"
else
## No argument is set
meld
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment