commit f5ca0acb2007ff599a13d09a1f94655557622467parent b41a56150a49103c89382e74e46f6d695fee568e
Author: Alexander Karle <akarle@umass.edu>
Date: Thu, 24 May 2018 16:05:18 -0400
Merge branch 'master' of https://github.com/akarle/dotfiles
Diffstat:
4 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/bash/aliases b/bash/aliases
@@ -1,8 +1,8 @@
# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
- colorflag="--color"
+ colorflag="--color"
else # macOS `ls`
- colorflag="-G"
+ colorflag="-G"
fi
# ls aliases
@@ -12,7 +12,17 @@ alias ll='ls -lh ${colorflag}'
# Git aliases
alias ga='git add'
-alias gc='git commit'
+alias gc='git commit --verbose'
+alias gd='git diff'
alias gp='git push'
alias gst='git status'
-alias gl='git log --stat'
+alias gl='git pull'
+alias gco='git checkout'
+alias gf='git fetch'
+alias glg='git log --stat'
+
+# Alias vim / vi to nvim if there
+if [ -x "$(command -v nvim)" ]; then
+ alias vi="nvim"
+ alias vim="nvim"
+fi
diff --git a/bash/bash_exports b/bash/bash_exports
@@ -0,0 +1,7 @@
+# if nvim exists, set it to the editor!
+if [ -x "$(command -v nvim)" ]; then
+ export EDITOR="nvim"
+ export MANPAGER="nvim -c 'set ft=man' -"
+else
+ export EDITOR="vim"
+fi
diff --git a/bash/bash_prompt b/bash/bash_prompt
@@ -3,7 +3,12 @@
# if you got xterm-256, export it!
if infocmp xterm-256color >/dev/null 2>&1; then
- export TERM=xterm-256color
+ # override xterm-256 if in tmux
+ if ! [ -z "$TMUX" ]; then
+ export TERM=tmux-256color
+ else
+ export TERM=xterm-256color
+ fi
fi
function parse_git_dirty() {
diff --git a/inputrc b/inputrc
@@ -0,0 +1,3 @@
+# tab completion
+Tab: menu-complete
+"\e[Z": menu-complete-backward