tutor icon indicating copy to clipboard operation
tutor copied to clipboard

feat: adds `tutor config edit`

Open tecoholic opened this issue 1 year ago • 5 comments

Quickly launch the default YAML editor for editing the config.yml file.

Background

As a developer working with multiple projects, I am constantly changing the tutor config and re-running the tutor dev launch to update the devstack. While it is as simple as running vim $(tutor config printroot)/config.yml, I often found myself wanting to simply express this better using tutor config edit. So this is an attempt at cross-platform solution doing the same. It might not be the best solution, but something to start with if someone else finds this useful and improves their DevEx.

Caveat: I have only tested this on Linux (both open and xdg-open works in mine, so it could be said Unix).

tecoholic avatar Jul 24 '24 06:07 tecoholic

@regisb Hi, Thanks for the review comments. I hoped to have addressed them by now. Somehow haven't found the time. I will handle the comments this week.

tecoholic avatar Aug 07 '24 11:08 tecoholic

I have nothing to add beyond Regis's review--just want to say that this is a great idea and thank you for the contribution 👍🏻

kdmccormick avatar Aug 09 '24 17:08 kdmccormick

Hi @tecoholic . I'm looking forward to this change! Looks like there are just a couple minor change requests left, and then we're good to merge this.

kdmccormick avatar Sep 23 '24 14:09 kdmccormick

@kdmccormick Hi, thanks for the ping. I was waiting on @regisb for more details about read only editor. Can we skip that scenario for now?

tecoholic avatar Sep 23 '24 21:09 tecoholic

@kdmccormick I am less interested in this feature than you seem to be -- mostly because (IMHO) it doesn't bring anything more than a .bashrc alias. E.g: alias tutor-config-edit='vim "$(tutor config printroot)/env.yml"'. So I'd rather defer to you for review.

regisb avatar Sep 24 '24 07:09 regisb

@kdmccormick Thank you for your comments and your patience with this PR. I have addressed your comments to my best. Kindly take another look when you can.

tecoholic avatar Nov 10 '24 05:11 tecoholic

@kdmccormick Thank you for the feedback. I added a changelog entry, new options -s and -e (explanation here), made the messages a bit more verbose. Kindly take a look.

tecoholic avatar Nov 14 '24 02:11 tecoholic

@DawoudSheraz I have addressed your comments about the docs and updated the PR.

tecoholic avatar Nov 28 '24 00:11 tecoholic

@kdmccormick Updated the PR with simpler version.

P.S: I left a reply to the comment in the review. But, it doesn't show up here. So, adding a note here, just in case.

tecoholic avatar Dec 03 '24 23:12 tecoholic

@kdmccormick Hi, thanks for letting me correct the branch. I couldn't move all the commits and the history with it. So, I just squashed everything and based it on the release branch. I have applied the fix you pointed out as well.

tecoholic avatar Dec 06 '24 08:12 tecoholic