The easiest way is in p4v or p4win, but that's not what you were asking about.
Try this:
p4 opened -c 999 | awk 'BEGIN { FS = "#" } // { print "p4 diff " $1 }' | csh
You, of course, need to make sure that the sub shell has p4 in its path, and $P4CLIENT, etc... are all set up.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…