Make OS X ls
color scheme similar to Linux
This commit is contained in:
parent
6b59f379b6
commit
cc39166555
|
@ -21,6 +21,10 @@ export PATH="/usr/sbin:/sbin:/usr/bin:/bin:$HOME/bin:$HOME/go/bin"
|
|||
if [[ $platform == "darwin" ]]; then
|
||||
# Prefer /usr/local/bin because homebrew
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
|
||||
# Enable colors and set a similar color scheme as Linux (see `man ls`)
|
||||
export CLICOLOR=1
|
||||
export LSCOLORS="ExGxcxdxcxegedabagecec"
|
||||
else
|
||||
export PATH="$PATH:/usr/local/bin:/usr/local/sbin"
|
||||
fi
|
||||
|
@ -78,9 +82,6 @@ elif [ "$TERM" = 'cygwin' ]; then
|
|||
ENLIGHTENED=1
|
||||
fi
|
||||
|
||||
# Make Mac OS X show colors in the `ls` command.
|
||||
export CLICOLOR=1
|
||||
|
||||
# Custom bash prompt.
|
||||
git_branch() {
|
||||
branch=`git branch 2> /dev/null | sed -e '/^[^*]/d' | perl -pe 's/^\*\s+//g'`
|
||||
|
|
|
@ -9,7 +9,6 @@ export LANG=en_US.UTF-8 # Unicode
|
|||
setopt prompt_subst # Allow for dynamic prompts
|
||||
autoload -U colors && colors # Get color aliases
|
||||
autoload -U compinit && compinit # Better tab completion
|
||||
export CLICOLOR=1 # Colors in `ls` on Mac OS
|
||||
export HISTSIZE=2000 # History settings
|
||||
export HISTFILE="$HOME/.history"
|
||||
export SAVEHIST=$HISTSIZE
|
||||
|
@ -21,6 +20,13 @@ setopt nobeep
|
|||
# 256 colors
|
||||
[[ "$TERM" == "xterm" ]] && export TERM=xterm-256color
|
||||
|
||||
# CLI colors under OS X for `ls`
|
||||
if [[ `uname` == "Darwin" ]]; then
|
||||
# Enable colors and set a similar scheme as on Linux (see `man ls`)
|
||||
export CLICOLOR=1
|
||||
export LSCOLORS="ExGxcxdxcxegedabagecec"
|
||||
fi
|
||||
|
||||
# Normalize the PATH
|
||||
CORE_PATH="/usr/sbin:/sbin:/usr/bin:/bin"
|
||||
USR_PATH="/usr/local/sbin:/usr/local/bin:${HOME}/bin:${HOME}/go/bin:${HOME}/android/sdk/platform-tools"
|
||||
|
|
Loading…
Reference in New Issue
Block a user