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

Allow --edit flag partway through an entry #906

Closed
rightbrace opened this issue Apr 5, 2020 · 5 comments · Fixed by #1091
Closed

Allow --edit flag partway through an entry #906

rightbrace opened this issue Apr 5, 2020 · 5 comments · Fixed by #1091
Labels
enhancement New feature or request 📌 This can't go stale

Comments

@rightbrace
Copy link

I think it would be really helpful if the --edit flag could be invoked partway through an entry, for example:

$ jrnl now: I just finished homeschooling @Jane for the day. We talked about contractions, I explained that do not is often written as (oh, I\'ll need a lot of single quotes, but I really don\'t feel like escaping all of \'em) --edit

This would then open a file with all of the text up until the --edit already in it, so you could keep writing comfortably without copying out of your shell and pasting into your editor.

@rightbrace rightbrace added 🆕 New! enhancement New feature or request labels Apr 5, 2020
@wren
Copy link
Member

wren commented Apr 5, 2020

Hi! Thanks for submitting an issue.

It looks like the viewing flag (-n 1 or -1) might already do what you're looking for.

In your case, it might look something like this:

$ jrnl This is going to be a short entry, so I might as well just put it all on one line, although now it's getting too long and I want to move this into an editor.
[Entry added to default journal]
$ jrnl --edit -1
# Opens the above entry in your editor

Does that do what you're intending?

@wren wren added needs more info Further information is requested and removed 🆕 New! labels Apr 5, 2020
@rightbrace
Copy link
Author

You know that is slightly less smooth than what I was intending (two commands over one) but I suppose it's close enough that adding the feature wouldn't be worth the additional complexity

@wren
Copy link
Member

wren commented Apr 5, 2020

That's fair. I'll think about whether this makes sense to implement or not, but for now that should get you most of the way there.

@wren wren removed the needs more info Further information is requested label Apr 5, 2020
@stale
Copy link

stale bot commented Jun 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issue: will be closed soon if no activity label Jun 4, 2020
@wren wren added the 📌 This can't go stale label Jun 6, 2020
@stale stale bot removed the stale Inactive issue: will be closed soon if no activity label Jun 6, 2020
@wren
Copy link
Member

wren commented Jun 6, 2020

We're not in a great place to implement this right now (has to be done after refactoring the arg parsing code), but we've talked it over and think it makes sense for jrnl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 📌 This can't go stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants