Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/martijnarts/dotfiles. .* in my home directory
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960# If not running interactively, don't do anything[[ $- != *i* ]] && return
source ~/.bash/git-promptsource ~/.bash/colors
alias ls='ls --color=auto'alias grep='grep --color=auto'alias vi='vim' && export EDITOR='vim'[ -x "$(command -v nvim)" ] && alias vi='nvim' && export EDITOR='nvim'alias sudo='sudo '
# Prints the last commands output for the PS1STATUS='$(if [ $? = 0 ]; then printf -; else printf $?; fi)'export PS1="${C_BGB} \$(eval \"echo \${STATUS}\") ${C_N} [${C_EMW}\A ${C_Y}\u${SSH_CLIENT+@\h}${C_N} \W${C_Y}\$(__git_ps1 \" (%s)\")${C_N}]${C_G}\$ ${C_N}"
# Instant history logging for working with multiple shells and history.shopt -s histappend # append to history, don't overwrite itexport PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
# fix for gnome-terminal new tab not opening working dir#. /etc/profile.d/vte.sh
# ssh alias to only use mosh when set in ssh configREAL_SSH=$(which ssh)ssh_mosher () { local SCRIPT="$REAL_SSH" if [ -n "$(grep -e "^Host $1\$" ~/.ssh/config)" ]; then NEXTLINE=$(awk "/^Host $1$/{getline; print}" ~/.ssh/config | sed -e 's/^ *//' -e 's/ *$//') if [ "$NEXTLINE" == "# mosh" ]; then SCRIPT="mosh" fi fi eval "$SCRIPT $@"}alias ssh="ssh_mosher"
# Project browsing helper functionsfind_project() { WORD=${COMP_WORDS[COMP_CWORD]} COMPREPLY=( $(find ~/Projects -mindepth 2 -maxdepth 2 -follow -iname $WORD'*' -not -name '.*' -type d -exec basename {} ';') ) return 0}goto_project() { cd $(find ~/Projects -mindepth 2 -maxdepth 2 -follow -iname $1 -not -name '.*' -type d)}alias gp=goto_projectalias fp=find_projectcomplete -F find_project goto_projectcomplete -F find_project gp
export PATH="/home/martijn/.gem/ruby/2.2.0/bin:$PATH"export LANG=en_USexport LC_ALL=en_US
[ -x $(command -v gpg-agent) ] && gpg-agent --daemon
GPG_TTY=$(tty)export GPG_TTY