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

Possibility to edit proposed run command #6

Open
ekkinox opened this issue Apr 4, 2023 · 6 comments
Open

Possibility to edit proposed run command #6

ekkinox opened this issue Apr 4, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@ekkinox
Copy link
Owner

ekkinox commented Apr 4, 2023

A cool feature would be to have the possibility to edit a proposed run command, when the user know it's not exactly matching expectations.

Something like changing the confirmation prompt from Confirm? [y/N] to Confirm? [y/e/N], where e would trigger edition

@ekkinox ekkinox added the enhancement New feature or request label Apr 4, 2023
@ekkinox ekkinox self-assigned this Apr 4, 2023
@mateothegreat
Copy link

What about returning it to stdout so it can be pipe-able to other commands?

@ekkinox
Copy link
Owner Author

ekkinox commented Apr 18, 2023

I was more thinking refocus on the prompt with the command open for edition, with a "edit" icon (to make user understand he takes control when he would press e).

would keep UI coherence and minimize the work imo

wdyt ?


for piping, yai has a bit of support since 0.2.0, for ex:

cat script.go | yai -c generate unit tests

or

cat error.log | yai -c tell me how to fix this

@gkopff
Copy link

gkopff commented May 15, 2023

In addition to editing the command, you might like also to consider that you might like to add more prompt information so that it provides an updated command with the additional information.

In effect Confirm? [y/e/p/N] where p gets you a prompt to add more detail.

@ekkinox
Copy link
Owner Author

ekkinox commented May 15, 2023

In addition to editing the command, you might like also to consider that you might like to add more prompt information so that it provides an updated command with the additional information.

In effect Confirm? [y/e/p/N] where p gets you a prompt to add more detail.

when pressing p you mean you would be able to enter more details in natural language to refine the proposed command ? So maybe r for refine instead ? wdyt ?

@gkopff
Copy link

gkopff commented May 15, 2023

Yep, that's the idea.

refine is good 👍

Here's an example of how I saw it being used:

🚀 > port forward port 5433 on my machine to localhost:5432 on the remote machine

   ssh -L 5433:localhost:5432 [email protected]                                                                                                                

forward the local port 5433 to the remote machine port 5432 over ssh

confirm execution? [y/e/r/N]

The first way to solve this is e and edit it yourself, or, as we are now discussing, with r and add:

🚀 > The user is greg, and the remote host is example.com

   ssh -L 5433:localhost:5432 [email protected]                                                                          

forward the local port 5433 to the remote machine port 5432 over ssh. The user is greg and the remote machine is example.com

confirm execution? [y/e/r/N]

@ekkinox
Copy link
Owner Author

ekkinox commented May 16, 2023

looks very good / simple to use !

on it asap

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

3 participants