diff options
Diffstat (limited to '.bash_profile')
-rw-r--r-- | .bash_profile | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/.bash_profile b/.bash_profile index 8cad899..e8b688e 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,5 +1,3 @@ -# /etc/skel/.bash_profile - # This file is sourced by bash for login shells. The following line # runs your .bashrc and is recommended by the bash info pages. [[ -f ~/.bashrc ]] && . ~/.bashrc @@ -8,23 +6,33 @@ EDITOR=vi export EDITOR source ~/perl5/perlbrew/etc/bashrc -export PATH="${HOME}/bin:${PATH}" +export PATH="${HOME}/bin:${HOME}/.raku/bin:${PATH}" export GPG_TTY="$(tty)" -eval "$(keychain --eval --noask --inherit any-once --agents gpg,ssh id_rsa id_ed25519 75193F88 D7A5DBBE)" - function e() { - emacsclient "$@" + emacsclient -n "$@" } function se() { - emacsclient "${@/#//sudo::}" + 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="$(perldoc -l "$1")" + fn="$(pd -lm "$1")" ex=$? if [[ $ex != 0 ]]; then return $ex @@ -32,5 +40,23 @@ function pm() { emacsclient -c -n "$fn" } -fortune +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 |