Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
test
.travis.yml
LICENSE
README.md
bp4o.bash
bp4o.fish
bp4o.zsh
install.sh
test.sh

README.md

Better P4 Output

Build Status

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.

ch = change
op = opened
su = submit
log = changes -s submitted -l

How to install it

BP4O works with Bash, Zsh, and Fish shell

Zsh Users

After installing, add this to your ~/.zshrc:

autoload -Uz bp4o
bp4o

macOS

brew tap zachwhaley/beer
brew install bp4o

Ubuntu

sudo add-apt-repository ppa:zachwhaley/ppa
sudo apt update
sudo apt install bp4o

Fedora/CentOS

sudo dnf copr enable zachwhaley/bp4o
sudo dnf install bp4o

Manually

Use the install.sh script to install BP4O

Install BP4O on the System

sudo ./install.sh

Or...

Install BP4O in your home directory

./install.sh ~

Or...

Install BP4O in some directory

./install.sh /some/dir

Uninstall

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

./install.sh -u ~

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.