-
Notifications
You must be signed in to change notification settings - Fork 350
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
FR: allow jj log
to update its output
#5121
Comments
Note: as suggested above, it is possible to emulate the behavior of this proposed
This behaves as expected, |
There's a FAQ entry: https://github.com/martinvonz/jj/blob/main/docs/FAQ.md#can-i-monitor-how-jj-log-evolves I personally don't think the |
If I might suggest an alternative, I have recently been using I believe I agree with Yuya that I don't think this is really necessary to include in |
jj-fzf displays the log by default and updates it when the history was modified via one of its key bindings. |
Is your feature request related to a problem? Please describe.
I'm working on cleaning up a complex series of commit, I keep the
jj log
output in a separate terminal to orient myself. Whenever I'm done working on a commit and I move to edit another commit, thejj log
output is semi-stale at this point (it displays the wrong "current" commit), I need to manually close it and rerun it.Describe the solution you'd like
I would like a way to get the
jj log
output to update continuously, or a keybinding to easily "refresh" the output.jj log
currently just pipes its output to the pager. Most pagers do not support interactive features that would let the user request an output update. But they do support closing the pager without closing the process itself. So an easy way to implement this would be to havejj log
work in a loop, instead of just once: (1) produce output, (2) call the pager, (3) when the pager closes, go to (1) again.Continuous update could be implemented by
jj log
somehow watching the repository and closing the pager itself when there is a change. But this is more complex and probably overkill, it is okay if the user has to ask for an update by pressing the "close the pager" keybinding. (Inless
this is justq
.)Of course, it should still be possible/easy to close
jj log
permanently, for example it should close completely (not just stop the pager and loop) when receiving a C-c signal. (Maybe users would find it surprising if the loop mode was enabled by default, as they expect C-c and close-the-pager to behave in the same way. It's okay to ask for an explicit option,jj log --loop
for example.)Describe alternatives you've considered
watch jj log
does not work at all, because the output ofwatch
is not meant to be interactive, the pager cannot be used therejj log; jj log; jj log
more or less does what I would expect, in thatq
updates the log output -- at most twice. But doing this in a loop requires more complex shell syntax than most users are familiar with, and is not so easy to document/recommend in a portable way.jj
knows how to work with a built-in pager called minus, so it would be possible to implement a specific UI protocol in minus for output update or continuous update. To me this sounds more complex and less easy to adapt to user's pager preference than simply supporting a loop mode when the user closes the pager.The text was updated successfully, but these errors were encountered: