From 99ef09bc5551a485256916d56c817b3b45c93588 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Wed, 31 Jan 2024 22:06:01 -0700 Subject: [PATCH] Consolidate aliases --- bash/bash_aliases | 12 ++++++++++++ bash/bashrc | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bash/bash_aliases b/bash/bash_aliases index a12bb7b2b..c2e2f0ce0 100644 --- a/bash/bash_aliases +++ b/bash/bash_aliases @@ -1,5 +1,17 @@ # vim: ft=sh +# Enable color support if possible +if [ -x /usr/bin/dircolors ]; then + test -r ${HOME}/.dircolors && eval "$(dircolors -b ${HOME}/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + alias dir='dir --color=auto' + alias vdir='vdir --color=auto' + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' + export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' +fi + # Vim stuff alias vim="${HOME}/.nix-profile/bin/nvim" alias :q="exit" diff --git a/bash/bashrc b/bash/bashrc index 11b7b6c74..f2607d046 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -71,18 +71,6 @@ PROMPT_COMMAND="source ${HOME}/.dotfiles/bash/prompt.sh" # Bell when prompt is returned to mark as urgent PROMPT_COMMAND="$PROMPT_COMMAND;printf \"\a\"; history -a" -# Enable color support if possible -if [ -x /usr/bin/dircolors ]; then - test -r ${HOME}/.dircolors && eval "$(dircolors -b ${HOME}/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - alias dir='dir --color=auto' - alias vdir='vdir --color=auto' - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' - export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' -fi - # Load aliases if [ -f ${HOME}/.dotfiles/bash/bash_aliases ]; then . "${HOME}/.dotfiles/bash/bash_aliases"