modify cli code for support tree, tree -l, tree -list commands