Skip to content
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

Add --interactive flag #7

Open
6 tasks
alicederyn opened this issue Jan 24, 2022 · 0 comments
Open
6 tasks

Add --interactive flag #7

alicederyn opened this issue Jan 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@alicederyn
Copy link
Owner

alicederyn commented Jan 24, 2022

It would be very convenient for rex to offer an --interactive mode, where it enters a REPL for bash that captures all commands run and, once the user has run exit or hit ^D, drops into an editor for a commit message with all evaluated commands listed in a script block.

We can probably leverage bash itself for the REPL, if we can reliably configure its history mode without the user's config files interfering. This means:

  • Changing which file history gets written to
  • Turning off the leading-space-disables-history feature
  • Setting a trap for errors that documents ways to recover (e.g. using || true)

We will also ideally have some consistent way of handling executed git commands in a non-surprising way; for instance, we could do one or more of:

  • strip informational commands like status from the history
  • replace the command itself to intercept and disable commands like commit
  • leave the repository locked to prevent concurrent operations
@alicederyn alicederyn added the enhancement New feature or request label Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant