pimterry/notes

Tree view

pimterry opened this issue · 4 comments

Debatable if this is still useful, now that we have ls (#19). Would it be useful if you had a way to turn a list of note names into a tree view? E.g. notes find <pattern> | notes tree:

├── my-note.md
├── notes/
    ├── another-note.md
    └── more-notes.md

Would you find this useful? Thoughts welcome.

This would be great. Presently, I added notes tree for myself.

@nnvn Great, good to know. Does your implementation of notes tree do exactly what the above says? Does that work well for you?

Just do tree --ignore-case -P '<pattern>' on the directory.

Pattern man:

-P pattern

List only those files that match the wild-card pattern. Note: you must use the -a option to also consider those files beginning with a dot .' for matching. Valid wildcard operators are *' (any zero or more characters), ?' (any single character), [...]' (any single character listed between brackets (optional - (dash) for character range may be used: ex: [A-Z]), and [^...]' (any single character not listed in brackets) and |' separates alternate patterns.

Instead of notes find <pattern> | notes tree, we can do notes tree <pattern> using tree's inbuilt pattern matching.