Create a gist now

Instantly share code, notes, and snippets.

anonymous /p4merge
Created Nov 30, 2010

What would you like to do?
p4merge script for Windows; to be placed in C:\Program Files(x86)\Git\bin (MSYS Git)
for arg; do [[ $arg = /dev/null ]] && arg=$NULL && echo "" >"$arg"; args+=("$arg"); done;
/c/Program\ Files/Perforce/p4merge "${args[@]}"
[[ -f $NULL ]] && rm $NULL

The echo "" >"$arg" adds an unnecessary (and annoying) empty line to the temporary file. I use touch "$arg" instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment