Repository navigation
Remove gh {issue,pr} comment prompt #2891
Description
Activity
I'm guessing it's there so people aren't disoriented when
ghsuddenly launchesvim(or whatever their$EDITORis)Thanks for the feedback. You've guessed our reasoning to avoid launching the editor program unprompted.
Would passing the
-eflag be a sufficient workaround for you? You could alias the command to include-eevery time you invoke the alias.Would passing the
-eflag be a sufficient workaround for you? You could alias the command to include-eevery time you invoke the alias.Ah, I didn't realize what that flag was for. (It's a little confusing that the docs for it say "Add body using editor", since that's the default.)
I think having a config setting might be a cleaner approach, but for now I will alias the command.
I think the issue is that many people will not realize you can get rid of the prompt by setting an alias (or a config option if you choose to add one), and they will either just deal with it or open issues. I'm not sure how this could be solved though.
Actually, there's not a way I can change the behavior of
gh pr comment(orgh issue comment) using an alias, because I can only add an alias at the top-level; e.g.gh prc. Another reason why a config option might be helpful :)Reacted by Mislav Marohnić@camelid You should be able to define an alias in bash or so, like
alias gh-pr="gh pr comment -e"no?But in general the behaviour of
hubon creating a PR just seems so much more useful; they start$EDITORwhich is prefilled w a text built from the individual commits, and then they take the first line as the PR title and the remainder as the body; they also skip everything after the cut-off line. This is much more git-like then then weird terminal UI ofghReacted by Mislav Marohnić- addedcoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributors
on Feb 16, 2021 - added and removedcoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributors
on Feb 9, 2022 Re-labeled this issue to indicate that we could improve the documentation for the
--editorflag to make this more discoverable. Otherwise, I don't think there is anything we need to change with theissue commentcommand.Note that we're also considering adding
--editorflag toissue createandissue editcommands too: #390 (comment)@mislav 👋 Any chance for a mechanism to globally enable the editor option (env variable or config file if there is one)?
(I wasn't aware of
--editoreither, I'm still usinghubto open pull requests. 😅)@mfilej No way of making
--editordefault right now; sorry!Reacted by Miha Filej
Describe the feature or problem you’d like to solve
When you run
gh issue commentorgh pr comment, you get a prompt like:The prompt seems like unnecessary friction to me. I'm guessing it's there so people aren't disoriented when
ghsuddenly launchesvim(or whatever their$EDITORis), but it's annoying to have to press Enter for it every single time I write a comment.Proposed solution
Remove the prompt. Maybe add a message like "Opening vim to draft comment"? It may not be visible long enough though.