diff options
Diffstat (limited to '.bash_profile')
-rw-r--r-- | .bash_profile | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/.bash_profile b/.bash_profile index f7c29eb..c146385 100644 --- a/.bash_profile +++ b/.bash_profile @@ -6,15 +6,51 @@ 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 --inherit any-once --agents ssh id_rsa id_ed25519)" + +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="$(perldoc -l "$1")" + 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' + +fortune + |