项目作者: zachwhaley

项目描述 :
Better P4 Output
高级语言: Python
项目地址: git://github.com/zachwhaley/bp4o.git
创建时间: 2016-04-06T11:21:54Z
项目社区:https://github.com/zachwhaley/bp4o

开源协议:MIT License

下载


Better P4 Output

Checks

A bunch of scripts to catch p4 commands, run them, and make their output better.

asciicast

Colored Diffs!

BP4O will use colordiff to output diffs in color from commands like p4 diff and p4 describe

To get colored diffs, install colordiff and unset the P4DIFF environment variable.

Aliases!

BP4O works with Perforce’s builtin aliasing!

And BP4O provides its own aliasing!

To use BP4O aliases, add a file named aliases to ~/.config/bp4o/.
Each line of ~/.config/bp4o/aliases is treated as an alias with the syntax <alias> = <command>.

e.g.

  1. ch = change
  2. op = opened
  3. su = submit
  4. log = changes -s submitted -l

How to install it

BP4O works with Bash, Zsh, and Fish shell

macOS

  1. brew tap zachwhaley/beer
  2. brew install bp4o

Manually

Use the install.sh script to install BP4O

Install BP4O on the System

  1. sudo ./install.sh

Or…

Install BP4O in your home directory

  1. ./install.sh ~

Or…

Install BP4O in some directory

  1. ./install.sh /some/dir

Uninstall

Use the -u option in install.sh to uninstall BP4O

  1. ./install.sh -u <install directory>

How it works

It overrides the p4 command with a shell function named p4.
When a p4 command is issued, this function looks for executables in your PATH named p4-command.
It then gives the command line arguments to this executable, which runs the p4 command, parses the output, and prints better output.