14 comments

[ 3.5 ms ] story [ 82.2 ms ] thread
Or, if you have Homebrew (http://mxcl.github.com/homebrew/) installed:

  brew install tree
Amazingly (and the comments on his blog also seem to jump on this), he does acknowledge that you can do it with a package manager. There's advantages to learning how to build something like this from source.
True, learning how to build things from source yourself is definitely useful, I probably wouldn't be using Homebrew if I wasn't comfortable with that first. It's definitely advantageous to be able to organise/upgrade everything via it though.
Only in this case the learning effect isn't that great, because he doesn't explain the (to me) most confusing part: Why is the edit of the make file necessary? Isn't make responsible for choosing the right configuration settings for the current environment?
No. The usual three step installation from source is

1. configure

2. make

3. sudo make install

Note the absence of 1, which would usually perform these kinds of things (checking for prerequisites, for example).

Very good utility. Thanks for the tip.
And this is on the front page?! Apologies for the meta-discussion, but this highlights go me just how much HN has changed. This tutorial is simply download, untar, uncomment relevant (and labelled) lines of a makefile and type make.
To get on the front page, you only need a few upvotes in a short period of time. I don't think anything has changed. At this moment, it only has 6 votes.

It is a nice command that people will find useful. Stuff like this should get a few votes.

I think in this case it hit the front page simply because people like me didn't know this tree command and immediately found it useful. That it be trivial to install is not the main point I think.
You only need to get a small amount of votes to appear on the frontpage, and its 3:14am now and 2:14am when you wrote that for HNs West Coast audience. I don't think there is much legitimate competition out there for this article.
Not only that but it's 10 times easier with Homebrew. So it's an incorrect article imo. Shouldn't make the frontpage. Especially with that title.
Front page !? No offense but it is a brogrammer-class tip to be able to compile something on a mac...
# emerge tree

;)

Useful `tree` aliases:

    alias l1 'tree --dirsfirst -ChFL 1'
    alias l2 'tree --dirsfirst -ChFL 2'
    alias l3 'tree --dirsfirst -ChFL 3'
    alias l4 'tree --dirsfirst -ChFL 4'
    alias l5 'tree --dirsfirst -ChFL 5'
    alias l6 'tree --dirsfirst -ChFL 6'