summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/dotfiles/bashrc.j212
1 files changed, 11 insertions, 1 deletions
diff --git a/misc/dotfiles/bashrc.j2 b/misc/dotfiles/bashrc.j2
index 70bbdbe..d0a69a6 100644
--- a/misc/dotfiles/bashrc.j2
+++ b/misc/dotfiles/bashrc.j2
@@ -3,6 +3,15 @@ if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
+# Enable colors for `ls` output, but not on macOS, see `CLICOLOR` comment.
+alias ls="ls --color=auto"
+
+# Enable colors for `grep` output.
+alias grep="grep --color=auto"
+
+# Enable colors for `diff` output.
+alias diff='diff --color=auto'
+
{% if ansible_facts['os_family'] == "Darwin" %}
# Specific settings for macOS.
if [[ "$OSTYPE" == "darwin"* ]]; then
@@ -16,7 +25,8 @@ export LC_CTYPE=en_US.UTF-8
# Silence bash deprecation warning.
export BASH_SILENCE_DEPRECATION_WARNING=1
-# Enable colors for `ls` output.
+# Enable colors for `ls` output. `ls` in macOS is separate from `bash` and
+# normal trick with alias doesn't work.
export CLICOLOR=1
# Get GitHub token from keychain to avoid homebrew rate limiting on GitHub