Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # .bashrc
- # Source global definitions
- if [ -f /etc/bashrc ]; then
- . /etc/bashrc
- fi
- # Uncomment the following line if you don't like systemctl's auto-paging feature:
- # export SYSTEMD_PAGER=
- # User specific aliases and functions
- ####### chivato del GIT
- function parse_git_dirty {
- git diff --quiet HEAD &>/dev/null
- [[ $? == 1 ]] && echo "⚡"
- }
- git_branch() {
- BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/(\1)/")
- echo "$BRANCH"
- }
- ##### helpers de dot
- #### ex: go_render myfile.dot &
- function get_mtime {
- ls -l --time-style=+%s "${1?}" | cut -d' ' -f6
- }
- function go_render {
- dotfile="$1"
- mtime=0
- while true;
- do
- newtime=$(get_mtime "$dotfile")
- test $mtime -ne $newtime && dot -O -Tpng $dotfile;
- mtime=$newtime
- sleep 1;
- done;
- }
- #######
- # joder ya con la dislexia !!
- alias gti="git"
- alias got="git"
- alias tit="git" # yeah
- # vim con poderes
- alias vim="vimx"
- ######## golang stuff
- function letsgo {
- export GOPATH=$PWD
- export GOBIN=$PWD/bin
- export PATH=$GOBIN:$PATH
- export GOROOT=$(go env GOROOT)
- }
- function ingopath {
- [[ $PWD == "$(go env GOPATH)"* ]] && echo "(👀)"
- }
- # prompt
- export PS1='\[\033[01;37m\]\w\[\033[00;36m\]$(ingopath)\[\033[01;33m\]$(git_branch)\[\033[01;91m\]$(parse_git_dirty)\[\033[01;30m\] $(date +%M%S)\[\033[00m\] $ '
- export PROJECTS_PATH="$HOME/Documentos"
- . $HOME/.asdf/asdf.sh
- . $HOME/.asdf/completions/asdf.bash
- export ERL_AFLAGS="-kernel shell_history enabled"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement