added error suppression to tree alias
authorrjorgenson <rjorgenson@gmail.com>
Wed, 30 Nov 2011 06:45:25 +0000 (23:45 -0700)
committerrjorgenson <rjorgenson@gmail.com>
Wed, 30 Nov 2011 06:45:25 +0000 (23:45 -0700)
the $(which tree) check general.aliases would ouput an error if the
    command was not found. Added suppression of that error.

aliases/available/general.aliases.bash

index cfd456f..6c722f4 100644 (file)
@@ -46,7 +46,7 @@ alias -- -="cd -"        # Go back
 alias h='history'
 
 # Tree
-if [ ! -x "$(which tree)" ]
+if [ ! -x "$(which tree 2>/dev/null)" ]
 then
   alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
 fi