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
Support editing a blog post after creating it with -e #203
Conversation
Quite like this, but perhaps if there is no |
This is great, but I don't think it'll work right on Windows, and it won't open the file in a GUI editor on Mac. We're going to need to figure out a cross-platform way of opening the file in the user's preferred editor. |
I don't think there are any problems, so long as |
1 similar comment
I think I'd want to do some experiments on OS X and Windows to make sure it'll do what users expect. |
Yeah, this is tricky. I'm not sure how to make everyone happy without a ton of weird platform-specific code and platform detection. |
@bhollis 👍. It might be more frustrating that this works sometimes for some people than the benefit this feature brings. |
I can see that, quite a rabbit hole. Instead, how about something like
|
Here's another proposal, based off what Git does. We could check a |
@bhollis 👍. |
👍 I think Sublime and Bundler follow this convention too. |
e77aadd
to
4ce6c51
Compare
Wow, I lost track of this PR. Here it is, revivied. I've implemented @bhollis suggested algorithim. It'll look for |
This fixes the call to the external editor to, as I copied the line from my old revision of this change. The API has since changed in the intervening 2 years, so update my code to match.
Wow, the 2 year old PR bump :) Awesome. |
Passing
-e
or--edit
to 'middleman article' will open the user's $EDITORwith the new blog post. It will fall back to vi if $EDITOR hasn't been exported.
(A fairly normal behaviour in Linux anyways.)
Closes #201.