Jump to content


p4 -F global option?

p4 global option -F

  • Please log in to reply
3 replies to this topic

#1 Ratman9000

Ratman9000

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 06 October 2014 - 06:05 PM

I thought I heard someone mention at MERGE that there is a -F global option to the p4 command line client.  I can't find documentation on it though...did I imagine this or is there really such a thing?  I thought I heard that it was a way to somehow format or tokenize the output of p4 commands so it is easier to just pull out the piece of it that you want.

#2 myocom

myocom

    Member

  • Members
  • PipPip
  • 24 posts

Posted 06 October 2014 - 06:19 PM

The -F option is still undocumented.  Check 'p4 help undoc' and Sam's blog post here for more information and examples.

#3 P4Sam

P4Sam

    Advanced Member

  • Members
  • PipPipPip
  • 484 posts
  • LocationSan Francisco, CA

Posted 06 October 2014 - 06:26 PM

Beat me to it by a minute.  :)  Here's the "p4 help undoc" entry for it:

p4 -F formatstring
Override the formatting string of server messages, allowing output
to be customized for easier scripting. Use the '-e' global option
to see examples of built-in message strings and the dictionary of
variables associated with each message. The '-F' option also works
with the dictionary provided by tagged (-Ztag) output mode.

It's likely to stay in "undoc" because using it effectively is a "some assembly required" sort of thing and it makes use of information that's not exposed to end users via normal usage (i.e. the output dictionaries and formatting strings).  Very much a "power user" feature.  :)

#4 Ratman9000

Ratman9000

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 08 October 2014 - 08:26 PM

Thanks, I forgot about checking undoc.  The blog post you linked to is very helpful.  We are currently doing some funky AWK scripting or batch FOR commands to pull pieces of info out of commands like 'p4 info' or 'p4 changes'.  I think using -F will simplify our lives enormously.  :lol:





Also tagged with one or more of these keywords: p4, global option, -F

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users