rhysd / notes-cli

Small markdown note taking CLI app playing nicely with your favorite editor and other CLI tools
MIT License
218 stars 26 forks source link

Directories structure adding like pass (unix password manager) #2

Closed bresilla closed 5 years ago

bresilla commented 5 years ago

I know is probably nitpicking, but would be cooler and more useful that when you type notes with no arguments it shows notes ls -o just like pass does (maybe even showing the tree structure):

<HOME>
├── category1
│   ├── nested-category
│   │   └── note3.md
│   ├── note1.md
│   └── note2.md
├── category2
│   ├── note4.md
│   └── note5.md
└── category3
    └── note6.md

And when adding new note, would make more sense if instead notes new category filename to use notes new category/filename so the very nested add would look like:

notes new category/subcategory/subsubcategory/filename

for a:

<HOME>
└── category
    └── subcategory
        └── subsubcategory
            └── filename

(i am just starting to learn GO, so hopefully sooner than later i would be able to contribute myself to this amazing project)

rhysd commented 5 years ago

Thank you for your trial and feedbacks. It's very helpful.

I know is probably nitpicking, but would be cooler and more useful that when you type notes with no arguments it shows notes ls -o just like pass does

I agree it's not so useful that notes shows help message. But when user firstly installs notes and run it at first, it does not show anything (since there is no note yet). It'd be confusing and showing help is better. I think following behavior would be acceptable when running notes:

What do you think?

And when adding new note, would make more sense if instead notes new category filename to use notes new category/filename so the very nested add would look like

I think 2 arguments (<category> <file>) is better since filename is mandatory. When user forgets file name and set only category as 1st argument, wrong file will be created. For example, when notes new cat/nested-cat is run and file name is not set, current command can detect file name is not specified. But when it accepts cat/file, it will create wrong file cat/nested-cat.md.

rhysd commented 5 years ago

I experimentally implemented this at branch https://github.com/rhysd/notes-cli/tree/no-arg

I think following behavior would be acceptable when running notes:

  • When there is no note, it shows help
  • When there is one or more notes, it shows notes ls -o
bresilla commented 5 years ago

I experimentally implemented this at branch https://github.com/rhysd/notes-cli/tree/no-arg

I think following behavior would be acceptable when running notes:

  • When there is no note, it shows help
  • When there is one or more notes, it shows notes ls -o

Yes, this is even better actually. :+1:

I think 2 arguments (<category> <file>) is better since filename is mandatory. When user forgets file name and set only category as 1st argument, wrong file will be created. For example, when notes new cat/nested-cat is run and file name is not set, current command can detect file name is not specified. But when it accepts cat/file, it will create wrong file cat/nested-cat.md.

Okay, it makes sense why you left like this. In any case i assume that in the future tab-completion would be added, maybe then notes new cat/nested-cat/file can make sense as it will help with names.

rhysd commented 5 years ago

Yeah.. Tab completion should be improved. Currently bash completion and zsh completion are provided but category cannot be completed. I need to investigate how to add the functionality (though I'm not familiar with bash completion)

sergeevabc commented 5 years ago

This app is hard to use (on Windows), sorry.

rhysd commented 5 years ago

@sergeevabc Thank you for trying this app. But I can get nothing from just saying 'hard' only. Please create another issue and describe details.