I tried to simply the process as the original solution is still a little bit cumbersom.
You can view the source codes of the GitHub Repository here .
What you need to do is to first open a new Terminal, and
cd Desktop # Navigate to Desktop where we’ll be downloading the repo
git clone https://github.com/hongtaoh/tree-1.8.0 # Clone the repo
mv ~/Desktop/tree-1.8.0/tree /usr/local/bin/ # Move tree to …