summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/bash/rc.d/10_aliases.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/.config/bash/rc.d/10_aliases.sh b/.config/bash/rc.d/10_aliases.sh
index 03ece7e..1b25f93 100644
--- a/.config/bash/rc.d/10_aliases.sh
+++ b/.config/bash/rc.d/10_aliases.sh
@@ -24,7 +24,7 @@ if [ -x "`which dircolors`" ]; then
if [[ -t 1 ]]; then
local red="$(tput setaf 1)"
local blue="$(tput setaf 4)"
- local bold="$(tput bold)"
+ local bold="$(tput bold)"
local reset="$(tput sgr0)"
command wdiff \
-w "$bold$red[-" \
@@ -36,6 +36,22 @@ if [ -x "`which dircolors`" ]; then
fi
}
+ chardiff() {
+ if [[ -t 1 ]]; then
+ local red="$(tput setaf 1)"
+ local blue="$(tput setaf 4)"
+ local bold="$(tput bold)"
+ local reset="$(tput sgr0)"
+ command chardiff \
+ -w "$bold$red[-" \
+ -x "-]$reset" \
+ -y "$bold$blue{+" \
+ -z "+}$reset" "$@"
+ else
+ command chardiff "$@"
+ fi
+ }
+
diff() {
if [[ -t 1 ]]; then
(