shell tree in macos

Use find to list the current folder:

find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

Add to ~/.bash_profile or ~/.zshrc
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"

Or install the tree with brew
brew install tree

相关文章
添加新评论
取消评论
*
*
*
勇士!消灭0条评论,这么艰巨的任务就靠你了!