Actions on multiple notes.
Hello! I am wondering if nb can support multiple object actions. My primary use case would be editing multiple files as one command:
-
nb e home:2 home:4 blah:6
I don't see that functionality offhand and maybe the defaults may well prevent that. Thanks!
nb delete can accept multiple selectors. I think that’s the only subcommand that supports it. How are you envisioning it would work with nb edit?
I could imagine using a stream editor being useful for making changes in multiple files, this is what I end up doing if I am making multiple changes to, perhaps, headers in multiple notes. The sed command has worked well for me for this, and is likely available on your system.
Perhaps, though, you are wanting to open multiple notes in your editor at once, which may be what you are asking about. In this case, you can write a loop to run the same command for the different notes. The xargs tool can be nice for this use.
Or is there something else that you were imagining?
Just want to note that nb move partially supports multiple source selectors, but this functionality is not yet included in the documentation because I haven't implemented globbing support yet and you have to specify each item individually.
So I have changed the editor for nb e to work with a kakoune server session (kak -s nbseshd -d):
Editor: kak -c nbseshd
Which works well and can add different notes to buffers (or tabs if you are using Codium for example).
I would like to envision having a way to have edit work with multiple files by iteration and sending to the editor session. Not quite sure that's possible, but I hope this explains the use case a little better. Let me know if you need more!
Just want to note that
nb movepartially supports multiple source selectors, but this functionality is not yet included in the documentation because I haven't implemented globbing support yet and you have to specify each item individually.
I would be happy with stipulating each item individually for now as an iterative release. I didn't intend to use much globbing at this time.
I think my main use case is for editors that can use multiple buffers (vim-a-likes or even something like VSCode) I want to be able to add multiple notes into the editor without doing a cycle of nb e 1 (return to shell or have to quit modal editor) nb e 2 etc.
Hope that clarifies things.