-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
utils: output what files edit
is opening.
#444
Conversation
Since we've moved all formulae to taps it's not necessarily obvious what the path for the files are otherwise.
@@ -431,6 +431,7 @@ def which_editor | |||
end | |||
|
|||
def exec_editor(*args) | |||
puts "Editing #{args.join "\n"}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't render very nicely if multiple arguments are supplied. May I suggest the following as a replacement?
ohai "Editing:", args
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it did render more nicely than that case as it's not truncated and the first argument (the typical case) is displayed on the same line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aesthetically, the changing indentation and that only the first line is prefixed with “Editing” for the atypical case is bothering me more, even if the common case becomes nicer and shorter.
But to be honest, I'll probably be slightly annoyed by this output anyway, no matter how it is styled, because I basically never want to know where the formula I'm editing is and when I do, my editor can tell me quickly and efficiently. But I'll certainly manage as I guess this is a minority opinion.
I guess the primary concern are formulae here, in which case something like On a side note, but not a serious suggestion for an alternative fix, this will also help: HOMEBREW_EDITOR=echo brew edit qt5 |
I think this is pretty editor dependent. This is designed to improve the flow for first-time contributors where it might not be obvious where these files are. It's also useful for more regular contributors to have a file path to copy/paste to various other locations outside of the editor (particularly for those editors that don't have a proxy icon). |
Yes, I understand the motivation for this PR and I imagine it will help the addressed user group. My needs and preferences are different, but that's not something that can (and should) stop this PR. |
Cool, thanks @UniqMartin. |
Since we've moved all formulae to taps it's not necessarily obvious what the path for the files are otherwise.
brew tests
with your changes locally?Since we've moved all formulae to taps it's not necessarily obvious what the path for the files are otherwise.