From 845ebb08feffe322dff54d9d93e554c8397edac4 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 21 Mar 2019 17:24:50 +0000 Subject: [PATCH] Creates wrapper around `p4 filelog` Should make viewing file history a little more ergonomic. --- configs/shared/zsh/functions.zsh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configs/shared/zsh/functions.zsh b/configs/shared/zsh/functions.zsh index ae2598539..815d90aef 100644 --- a/configs/shared/zsh/functions.zsh +++ b/configs/shared/zsh/functions.zsh @@ -530,6 +530,15 @@ g3_root() { echo "${PWD%%/google3/*}/google3" } +p4_filelog() { + # Logs a file's Piper history. This is a convenience wrapper around + # `p4 filelog`. + # `filename` should be a relative path. + # Usage: p4_filelog + # Depends: p4 + p4 filelog "//depot/$(pwd | grep -P -o 'google3\/.+$')/$1" +} + citc_workspace() { # Returns the name of your current CitC workspace pwd | grep -o -P "$(whoami)\/[^\/]+"