From 6c550ab9a7592a90803056ac0e8ebd6bc91090c5 Mon Sep 17 00:00:00 2001 From: staticsafe Date: Sun, 10 Jun 2012 08:58:44 -0400 Subject: [PATCH] modifying ls alias to be more *nix friendly and adding grep options --- .zsh/aliases.zsh | 7 ++++++- .zsh/exports.zsh | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.zsh/aliases.zsh b/.zsh/aliases.zsh index 02e04e0..7c79436 100644 --- a/.zsh/aliases.zsh +++ b/.zsh/aliases.zsh @@ -7,4 +7,9 @@ alias macgen="openssl rand -hex 6 | sed 's/\(..\)/\1:/g;s/../00/;s/.$//' | tr '[ alias quickpwgen="tr -cd '[:alnum:]' < /dev/urandom | fold -w30 | head -n1" alias mailstop="sudo /etc/init.d/postfix stop && sudo /etc/init.d/dovecot stop && sudo /etc/init.d/amavis stop && sudo /etc/init.d/mysql stop && sudo /etc/init.d/saslauthd stop && sudo /etc/init.d/spamassassin stop" alias mailstart="sudo /etc/init.d/postfix start && sudo /etc/init.d/dovecot start && sudo /etc/init.d/amavis start && sudo /etc/init.d/mysql start && sudo /etc/init.d/saslauthd start && sudo /etc/init.d/spamassassin start" -alias ls="ls --color=auto" + +if [ "$DISABLE_LS_COLORS" != "true" ] +then + # Find the option for using colors in ls, depending on the version: Linux or BSD + ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G' +fi diff --git a/.zsh/exports.zsh b/.zsh/exports.zsh index 9407ebb..be2abc5 100644 --- a/.zsh/exports.zsh +++ b/.zsh/exports.zsh @@ -1,10 +1,13 @@ #default apps export EDITOR="vim" export PAGER="most" -#history stuff +# history stuff # number of lines kept in history export HISTSIZE=1000 # number of lines saved in the history after logout export SAVEHIST=1000 # location of history export HISTFILE=~/.zhistory +# grep options +export GREP_OPTIONS='--color=auto' +export GREP_COLOR='1;32'