From 23a21a68adb8e741774ea4afbf01f7162d1455eb Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Tue, 19 Jul 2016 14:14:24 +0100 Subject: [PATCH] Tidy up the function aliases. --- .bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 03250bc..76deafe 100755 --- a/.bashrc +++ b/.bashrc @@ -121,11 +121,11 @@ export PROMPT_COMMAND="history -a; ${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}" #-------------------------------------------------------------------------------- # Command alias functions #-------------------------------------------------------------------------------- -ll() { ls -l ${@}; } && export -f ll datafart() { curl --data-binary @- datafart.com; } && export -f datafart space() { du -ahx --max-depth=1 | sort -h; } && export -f space +if ! alias ll 2>/dev/null; then function ll() { ls -l ${@}; } && export -f ll; fi [[ -x $(which htop 2>/dev/null) ]] && top() { sudo htop; } && export -f top -[[ -x $(which psgrep 2>/dev/null) ]] || psgrep() { ps -ef | grep ${@}; } && export -f psgrep +[[ -x $(which psgrep 2>/dev/null) ]] || ( psgrep() { ps -ef | grep ${@}; } && export -f psgrep ) [[ -x $(which gdu 2>/dev/null) ]] && du() { gdu ${@}; } && export -f du [[ -x $(which gsort 2>/dev/null) ]] && sort() { gsort ${@}; } && export -f sort #--------------------------------------------------------------------------------