Files
dotfiles/zsh/.bash_profile.google
2022-08-17 11:14:25 -05:00

79 lines
2.8 KiB
Bash

# ---------------
# Google Specific
# ---------------
# For running crow against a remote X server
# xhost +
export PATH=$PATH:/google/src/head/depot/google3/experimental/users/cnieves/util
export XAUTHORITY=~/.Xauthority
export GOROOT=/usr/lib/google-golang
export PATH=$GOROOT/bin:$PATH
export JAVA_HOME=$(readlink -ne /usr/local/buildtools/java/jdk)
function gcert() {
if [[ -n $TMUX ]]; then
eval $(tmux show-environment -s)
fi
command gcert "$@"
}
function tmux_title() {
if [[ $PWD =~ /google/src/cloud/[^/]+/([^/]+)/.* ]]; then
tmx2 rename-window "${match[1]}"
else
tmx2 rename-window "$(basename "`pwd`")"
fi
}
if [[ ! -z "$TMUX" ]]; then
precmd_functions+=(tmux_title)
fi
FORTUNES=/google/data/ro/users/di/diamondm/engfortunes/fortune.sh
if [ -f "$FORTUNES" ]; then
prodcertstatus &> /dev/null && $FORTUNES
fi
# Install fzf-query
export PATH="${PATH}:/google/bin/releases/editor-devtools"
# General fzf settings.
export FZF_DEFAULT_OPTS=" \
--inline-info \
--reverse \
--color=fg+:#F8F8F8,bg+:#515559,pointer:#F8F8F8,marker:226 \
--bind=ctrl-e:select-all+accept \
--bind=ctrl-d:half-page-down \
--bind=ctrl-e:half-page-up
--bind=ctrl-t:toggle+down
--bind=ctrl-b:toggle+up
--bind=ctrl-g:select-all+accept \
"
# Preview code with pygmentize.
export FZF_CS_PREVIEW_COMMAND="python third_party/py/pygments/google/google_pygmentize.py -f terminal16m -O style=native"
# Preview highlight: foreground: RG(248, 248, 248) = #F8F8F8, background: RGB(81, 85, 89) = #515559.
export FZF_CS_PREVIEW_HIGHLIGHT="\x1b[38;2;248;248;248m\x1b[48;2;81;85;89m"
source ~/fzf-at-google.zsh
source ~/g3path.zsh
source /etc/bash_completion.d/hgd
alias acid=/google/bin/releases/mobile-devx-platform/acid/acid
alias apido='/google/data/ro/teams/oneplatform/apido'
alias bugs=/google/data/rw/users/mk/mkannan/www/bin/bugs
alias cider='/google/src/head/depot/google3/experimental/cider_here/cider_here.sh'
alias crow=/google/bin/releases/mobile-devx-platform/crow/crow.par
alias er=/google/data/ro/users/ho/hooper/er
alias fixjs=/google/src/files/head/depot/google3/third_party/java_src/jscomp/java/com/google/javascript/jscomp/lint/fixjs.sh
alias fortune=/google/data/ro/users/di/diamondm/engfortunes/fortune.sh
alias hgcdg4='cd $(g4 g4d $(hg exportedcl))'
alias jadep=/google/data/ro/teams/jade/jadep
alias replace_string=/google/src/head/depot/google3/devtools/scripts/replace_string
alias safergcp=/google/bin/releases/safer-gcp/tools/safergcp
alias add_deps_to_usages='/google/src/head/depot/google3/apps/framework/tools/add_deps_to_usages.sh'
alias plxutil='/google/data/ro/teams/plx/plxutil'
export HGSHORT_CMDS="cat head tail mv cp rm chmod g4 diff merge patch meld trim less more"
source /etc/bash_completion.d/hgd
alias hgd='source /google/src/head/depot/google3/experimental/fig_contrib/hgshort/hgd.sh'
export ACID_STARTUP_SCRIPT_PATH=~/acid_startup.sh