opa icon indicating copy to clipboard operation
opa copied to clipboard

Multiline History

Open stobias123 opened this issue 2 years ago • 4 comments

The repl seems critical to me for developing policy. Statements like the below are allowed in the repl as multiline statements.

> some resource_type;
| crud := weights[resource_type];
| del := crud["delete"] * count(analysis.deletes_by_type[resource_type]);
| score := del

When I go back through history, I only get 1 line at a time. Other repls like ipython allow me to click "up" once and get the entire statement.

Things really slow down when I have to click back up through each part of a statement as shown above. I'd love for it to be a one click operation.

What is the underlying problem you're trying to solve?

By making this change, I'm hoping to improve the developer experience in the repl. Currently clicking through each is really frustrating.

Describe the ideal solution

It would behave like ipython.

stobias123 avatar Jul 26 '22 05:07 stobias123

I think we've reached the end of our repl library. There's another issue with multi-line copy paste, https://github.com/open-policy-agent/opa/issues/962, and #1503 for inputrc.

srenatus avatar Jul 26 '22 06:07 srenatus

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.

stale[bot] avatar Aug 30 '22 22:08 stale[bot]

dont go stale! this is a huge quality of life imiprovement!

stobias123 avatar Aug 30 '22 22:08 stobias123

Sorry @stobias123, the stale bot is pretty aggressive about making sure old issues get tagged as such. :sweat_smile:

You are correct that this would be a substantial quality-of-life improvement. I'm not sure of the precise difficulty level, but it'll likely involve ripping out and changing a bit in the REPL library.

philipaconrad avatar Sep 01 '22 18:09 philipaconrad

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.

stale[bot] avatar Oct 02 '22 00:10 stale[bot]

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.

stale[bot] avatar Apr 07 '23 09:04 stale[bot]