-# Git aliases
+# Gjkit aliases
alias gs='git status -sb ' # Note the trailing space
alias ga='git add ' # Note the trailing space
alias gbr='git branch ' # Note the trailing space
alias gsp='git stash pop'
alias sl=ls
-alias ls='ls -G'
-alias la='ls -AF'
-alias ll='ls -al'
+alias la='ls -A'
+alias ll='ls -Al'
alias l1='ls -1'
alias l.='ls -d .*'
-if [ $OSTYPE != *darwin* ]
-then
- #alias ls="ls --color=auto"
- alias ls="command ls $LS_COMMON"
-fi
-
-LS_COMMON="-hF"
-#LS_COMMON="$LS_COMMON -I NTUSER.\* -I ntuser.\*"
-
+flags="-hF"
# Detect which `ls` flavor is in use
-if whence dircolors > /dev/null 2>&1; then # GNU `ls`
+if [ -x "$(which dircolors 2>/dev/null)" ]; then # GNU `ls`
eval $(dircolors -b $HOME/.dir_colors)
- colorflag="--color"
+ flags="$flags --color=auto"
+ flags="$flags -I NTUSER.\* -I ntuser.\*"
else # OS X `ls`
- #eval $(gdircolors $HOME/.dircolors)
export CLICOLOR=1
- colorflag="-G"
+ flags="$flags -G"
fi
+alias ls="ls $flags"
# Shortcuts
alias g='git'