Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree view #26

Open
pimterry opened this issue Dec 6, 2016 · 4 comments
Open

Tree view #26

pimterry opened this issue Dec 6, 2016 · 4 comments

Comments

@pimterry
Copy link
Owner

pimterry commented Dec 6, 2016

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.

@nndurj
Copy link

nndurj commented Jan 30, 2017

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

@pimterry
Copy link
Owner Author

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

@nndurj
Copy link

nndurj commented Jan 30, 2017

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.

@nndurj
Copy link

nndurj commented Jan 30, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants