From 99033c7fd67f43d3f76b0b959a8bbef2be72fd46 Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 16 Aug 2017 13:24:28 -0500 Subject: [PATCH] .profile: Detect alias for dcfldd, correct TERM under urxvt --- .profile | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.profile b/.profile index d42e25f9..a3ae563d 100755 --- a/.profile +++ b/.profile @@ -9,23 +9,15 @@ # Users of this script on minimalist shells will have to adapt # this script accordingly. -contains() { - string="$1" - substring="$2" - if test "${string#*$substring}" != "$string"; then - return 0 - else - return 1 - fi -} - # Common miscellaneous aliases are all defined here for convenience __define_aliases() { # Common Aliases alias cp='cp -i' - alias dd=dcfldd + if [ `which dcfldd` ]; then + alias dd=dcfldd + fi alias ls='ls --color=auto' alias ll='ls -alF' alias la='ls -a --color=auto' @@ -64,7 +56,9 @@ __define_functions() { __define_aliases __define_functions -export TERM="linux" +if [ "$TERM" = "rxvt-unicode-256color" ]; then + export TERM=xterm-256color +fi EDITOR=$(which vim) PATH=$PATH:$HOME/.bin:$HOME/.local/bin