#!/bin/sh d="$(dirname "$1")/" cd "$d" t=diff; for x in "$@"; do t=$t" ${x#$d}"; done exec xterm -title "$t" -e with-shell diff -u "$@"