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

Edit commands from sgpt -s mode . . . #497

Open
startakovsky opened this issue Feb 25, 2024 · 0 comments
Open

Edit commands from sgpt -s mode . . . #497

startakovsky opened this issue Feb 25, 2024 · 0 comments

Comments

@startakovsky
Copy link
Contributor

sgpt -s is a great feature but I would like to propose the ability to edit the output before execution, sort of like whatever happens with ctrl +l (shell integration). Maybe now I am answering my own question, but the difference here is that since I can pipe to here and cannot pipe to ctrl +l I can totally see how this would be valuable. For example, mistakes happen and it may be easier to correct it right away.

Current Situation

$ sgpt --shell "find all json files in current folder"
# -> find . -type f -name "*.json"
# -> [E]xecute, [D]escribe, [A]bort: 

Proposed Future Option 1 ( add Modify to list of options)

$ sgpt --shell "find all json files in current folder"
# -> find . -type f -name "*.json"
# -> [M]odify, [E]xecute, [D]escribe, [A]bort: 

Pros: Current Functionality remains

Proposed Future Option 2 (remove Execute, replace with Edit)

$ sgpt --shell "find all json files in current folder"
# -> find . -type f -name "*.json"
# -> [E]dit, [D]escribe, [A]bort: 

Pros: Current User Behavior is safe and product doesn't just allow to execute on autopilot.
Cons: You have to press enter twice instead of once

Proposed Future Option 3 (remove Execute, replace with Modify)

$ sgpt --shell "find all json files in current folder"
# -> find . -type f -name "*.json"
# -> [M]odify, [D]escribe, [A]bort: 

I don't actually like this one, because Option 2 is better 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant