[[ -f ~/.bashrc ]] && . ~/.bashrc
EDITOR=vi
export EDITOR
source ~/perl5/perlbrew/etc/bashrc
export PATH="${HOME}/bin:${HOME}/.raku/bin:${PATH}"
export GPG_TTY="$(tty)"
function e() {
emacsclient -n "$@"
}
function se() {
emacsclient -n "${@/#//sudo::}"
}
function pd() {
if [[ $1 == -b ]]; then
firefox "https://metacpan.org/pod/$2"
else
if type cpandoc &>/dev/null; then
cpandoc "$@"
else
perldoc "$@"
fi
fi
}
function pm() {
local fn
local ex
fn="$(pd -lm "$1")"
ex=$?
if [[ $ex != 0 ]]; then
return $ex
fi
emacsclient -c -n "$fn"
}
function killmerged() {
for b in $(git branch --merged HEAD --no-contains HEAD|grep -vE 'stage|master|svn|develop|uat'); do
b="${b##+( )}"
b="${b%%+( )}"
git branch -d $b && git push origin :$b
done
}
export PERLDOC='-MPod::Text::Color::Delight'
if [[ -z "$DISPLAY" ]]; then
TTY=$(tty)
[[ "${TTY/tty}" != "$TTY" && "${TTY:8:1}" = "8" ]] &&
exec startx >~/xsession-errors 2>&1
fi
if [[ -z "$DBUS_SESSION_BUS_ADDRESS" && -e .dbus.env ]]; then
source .dbus.env
fi