4 messages in com.perforce.perforce-user[p4] FW: viewing a file on command li...| From | Sent On | Attachments |
|---|---|---|
| Fawad Khan | 08 Aug 2002 14:38 | |
| Bob Arnson | 08 Aug 2002 18:32 | |
| Bob Arnson | 08 Aug 2002 18:59 | |
| Gilad | 11 Aug 2002 04:45 |
| Subject: | [p4] FW: viewing a file on command line without syncing it![]() |
|---|---|
| From: | Gilad (gil...@riverhead.com) |
| Date: | 08/11/2002 04:45:28 AM |
| List: | com.perforce.perforce-user |
MessageHere is a small bash function you can cut&paste into your .bashrc (changes to other shells are minor) p4view () { editor=${P4EDITOR:-${EDITOR:-vi}}; pFile=$1; file=$(basename $(echo $pFile | awk -F\# '{print $1}')); if ! p4 print -o /tmp/$file $pFile; then echo Usage: p4view '<file-name>#<version>'; return 1; fi; $editor /tmp/$file; \rm /tmp/$file } -----Original Message----- From: perforce-user-admin at perforce.com [mailto:perforce-user-admin at perforce.com]On Behalf Of Fawad Khan Sent: Thursday, August 08, 2002 11:39 PM To: perforce-user at perforce.com Subject: [p4] FW: viewing a file on command line without syncing it
-----Original Message----- From: Fawad Khan Sent: Thursday, August 08, 2002 2:37 PM To: Fawad Khan; 'support at perforce.com' Subject: RE: viewing a file on command line without syncing it
I think I found out the command to use to view the file, p4 print.
But, I'd like to view the result of this command in emacs editor rather than on the standard output. I tried to pipe it but that didn't seem to work as it just brought the initial emacs page. Any suggestions?
Thanks, Fawad. -----Original Message----- From: Fawad Khan Sent: Thursday, August 08, 2002 2:31 PM To: 'support at perforce.com' Subject: viewing a file on command line without syncing it
What command can I use in order to view a file on command line(unix/linux) without doing a sync?
Also, will that command invoke vi editor or will it invoke the editor defined in my P4EDITOR variable?
Thanks, Fawad Khan




