From 010c9d5f1a97be6291943d76e5faa097b2aa7299 Mon Sep 17 00:00:00 2001 From: Von Random Date: Sun, 19 Oct 2014 18:03:10 +0400 Subject: [PATCH] fixed bash inconsistency and gci alias --- shellrc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/shellrc b/shellrc index 9f87ad3..454078e 100644 --- a/shellrc +++ b/shellrc @@ -3,13 +3,12 @@ [[ $- != *i* ]] && return # Simplify further configuration by is_zsh() function instead of using [[]] every time -if [[ -n ${ZSH_VERSION} ]]; then - is_zsh() { return 0 } - is_exec() { [[ -x $(whence ${1}) ]] } +is_zsh() { [[ -n ${ZSH_VERSION} ]]; } +if is_zsh; then + is_exec() { [[ -x $(whence ${1}) ]]; } export HOSTNAME=${HOST} else - is_zsh() { return 1 } - is_exec() { [[ -x $(type -P ${1}) ]] } + is_exec() { [[ -x $(type -P ${1}) ]]; } fi # ---> $PATH @@ -132,7 +131,7 @@ alias mountnrg='sudo mount -o loop,offset=307200' # git alias gss='command git status -s' alias gdf='command git diff' -alias gci='command git commit' +alias gci='command git commit -a' alias gup='command git pull' # svn alias sss='command svn status'