Wrapper around "p4 diff" which detects use of the -c flag and calls
p4-diffchange, thus enabling uses such as "p4 diff -c 12345" which will
show diffs only for files opened in changelist 12345.
--- /dev/null
+#!/bin/bash
+
+. ${0%/*}/common
+
+function parse_change() {
+ while getopts ":c:" opt; do
+ case $opt in
+ c) echo $OPTARG;;
+ esac
+ done
+}
+
+if [ -n "$(parse_change $*)" ]; then
+ exec ${0%/*}/p4-diffchange $p4opts diffchange ${1+"$@"}
+else
+ exec p4 $p4opts $p4command ${1+"$@"}
+fi