dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README

commit 010d651372c477241ae8c1741ad056794320f9af (patch)
parent 495bd6a5a92c76cb42e8c2a49718210bb051ac57
Author: Alexander Karle <akarle@umass.edu>
Date:   Sat,  1 Dec 2018 15:48:29 -0500

[bash] git completions for aliases + grep color alias

Diffstat:
Mbash/aliases | 9+++++++++
Mbash/bashrc | 5++++-
2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/bash/aliases b/bash/aliases @@ -26,6 +26,12 @@ alias glg='git log --stat' alias g_='git stash' alias g_p='git stash pop' +# Git completion for aliases +__git_complete ga _git_add +__git_complete gco _git_checkout +__git_complete gd _git_diff +__git_complete ga _git_add + # Alias vim / vi to nvim if there if [ -x "$(command -v nvim)" ]; then alias vi="nvim" @@ -37,3 +43,6 @@ alias sudovim='sudo vim -u NONE' # Common cd aliases alias cddv='cd ~/.vim' + +# grep +alias grep='grep --color' diff --git a/bash/bashrc b/bash/bashrc @@ -6,7 +6,7 @@ [[ $- == *i* ]] && stty -ixon # Load the shell dotfiles -for file in ~/.{bash_path,bash_prompt,bash_exports,aliases}; do +for file in ~/.bash_{path,prompt,exports}; do [ -r "$file" ] && source "$file" done unset file @@ -31,3 +31,6 @@ shopt -s checkwinsize # Git Completion [ -f ~/.bash/git-completion.bash ] && source ~/.bash/git-completion.bash + +# Source aliases (must go after git completion) +[ -r "$HOME/.aliases" ] && source "$HOME/.aliases"