Permalink
Browse files

Attempt to handle machine specific aliases

Test for availability of executables before definition, this approach
may need refinement
  • Loading branch information...
1 parent e2af2f5 commit 39a9ad73b3cd5095ae501a344261206fd3be51d8 @dearieme committed Jan 11, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 .bash_aliases
View
12 .bash_aliases
@@ -1,5 +1,5 @@
-# My aliases
-
+# Global aliases, normally available on all machines
+#
alias l='ls'
alias ll='ls -l'
alias l.='ls -A'
@@ -12,5 +12,9 @@ alias e='vim'
alias grep='grep --color=auto'
alias pgrep='pgrep -l'
alias rmbaks='find . -name "*~" -exec rm {} \;'
-alias tea='echo "notify-send -i dialog-information -t 0 \"Tea!\" \"Your tea is nicely brewed\"" | at now +4 minutes'
-alias screenx='screenx.sh && exit'
+
+# Local aliases
+#
+[ -x /usr/bin/notify-send ] && alias tea='echo "notify-send -i dialog-information -t 0 \"Tea!\" \"Your tea is nicely brewed\"" | at now +4 minutes'
+[ -x ${HOME}/bin/screenx.sh ] && alias screenx='screenx.sh && exit'
+[ -x /usr/bin/ack-grep ] && alias ack='ack-grep'

0 comments on commit 39a9ad7

Please sign in to comment.