From f70488eab7fa9626d1bd7142441cb11bb74cd00c Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Thu, 21 Mar 2019 14:15:09 -0700 Subject: [PATCH] Better support on FreeBSD. --- dotfiles/aliases | 6 ++++-- dotfiles/zshrc | 8 +------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/dotfiles/aliases b/dotfiles/aliases index a9e81bf..6bc59b7 100755 --- a/dotfiles/aliases +++ b/dotfiles/aliases @@ -8,9 +8,11 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo alias luksFormat='cryptsetup luksFormat -s 512 -c aes-xts-plain64 -h sha256 -i 15000' # Colors -if [ `uname` != 'Darwin' -a `uname` != 'NetBSD' ] ; then - # Should have a better way to check for GNU versions +if [ ls --version >/dev/null 2>&1 ] ; then alias ls='ls --color=auto' +fi +if [ `uname` != 'Darwin' -a `uname` != 'NetBSD' -a `uname` != 'FreeBSD' -a `uname` != 'OpenBSD' ] ; then + # Should have a better way to check for GNU versions alias grep='grep --color=auto' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 044eab3..42387a9 100755 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -21,13 +21,7 @@ esac autoload -U colors && colors PS1="%{$fg[black]%}[%{$fg[yellow]%}%h%{$fg[black]%}] %{%(!.$fg[red].$fg[green])%}%8>..>%n%>>%{$fg[white]%}@%{$fg[blue]%}%12>..>%m%>>%{$fg[white]%}:%{$fg[green]%}%32<...<%~%<<%{$fg[white]%}%#%{$reset_color%} " -if [ `uname` != 'Darwin' ] ; then - # ls Colors - alias ls='ls --color' - zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} -else - alias ls='ls -G' -fi +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} # Load prezto if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then