-
Notifications
You must be signed in to change notification settings - Fork 129
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
[idea] show output from last successful command #4
Comments
Wow, interesting idea, haven't occurred to me before! Thanks a lot! I'll totally try to think about it more, how I'd best like to see something like this work... there's so many options... |
No problem. Actually on further thought, even if the command succeeds, it would still be helpful to see the output from the previous command in the pipeline since I might not have entered the correct command yet and it might be hard to do so without seeing the input I'm actually working with. |
As a side effect of adding the "Press Enter to run" feature in v0.2+, in my experience at least, I think the original issue is now somewhat mitigated (the "earlier output" doesn't disappear so fast now) — at least less glaring. As to what more can be done, as of now I have two general ideas for directions in which this idea could be taken:
|
I think this does mostly solve the problem so I'd say I'm fine with this being closed if you wish. |
An idea similar to "superpowered" So I was thinking about this mode when the whole command gets parsed and you don't just see the resulting output of the whole long command, but you see the output of the current and the previous command block that you're editing now, e.g. in a command:
you should see the output of cmd2 and the output of cmd1 (the previous command) to help you understand the data transformation better. |
Oh, lol, it's weird and funny getting somewhat popular and suddenly seeing my tool featured at various curious places :) But, back to the matter at hand: I'm not planning to write a parser, sorry. Even if I focused purely on bash, it would be super hard; but up already allows plugging in any interpreter anyone might want through Please however see pipecut for an earlier project attempting something like that. (I learnt about it only after I already wrote up. Both projects share the main idea, however the execution differs in some ways.) One theoretical alternative might be to embed e.g. Lua in up, and allow users to provide their own parsers for any interpreter they want. But I currently don't plan to follow this path, either. If you want to try, you're welcome to fork, add this feature, and hopefully tell us about your experiences (or you may just run away with it, I'm in no power to hold you back). edit: And by the way, for more complex data flow/stream constructions, I especially recommend checking out Luna language. I believe it's a revolutionary project, and I hope up will become obsoleted by Luna at some point in the future. |
While typing a command, when I'm in the middle, of course it's going to fail while I'm still writing it because it's not complete. In addition to showing the error from the command in progress, it would be great to also show the result of the previous command so I can remember what the output looks like. Cool tool though :)
The text was updated successfully, but these errors were encountered: