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

How difficult would it be to have fix command? #120

Open
jodusan opened this issue Jul 25, 2024 · 2 comments
Open

How difficult would it be to have fix command? #120

jodusan opened this issue Jul 25, 2024 · 2 comments

Comments

@jodusan
Copy link

jodusan commented Jul 25, 2024

Common case of using ai to help is to fix terminal command issues and dont have to copy error from command line (like this project https://github.com/shahnk19/gpt-comrade)

where if previous command fails command as "comrade fix" would right there in terminal suggest resolution. How difficult woudl be to add this?

@steve8708
Copy link
Contributor

oh thats a neat idea, always open to pull requests! an ai fix command could be a great idea and i don't think would be complicated to implement

@RezaRafia
Copy link

I was looking for a solution for this one.
When you run a node app in a terminal, the node app itself doesn't have access to the current terminal history, if you run "history" command using execa it will run it on a new terminal with no ( or different ) history .

Accessing .bash_history could be a solution, but it might be more complicated on non-Unix shells.

I think passing the command as an argument is a good approach. Something like ai fix "npm install react". Someone could simply define an alias to automatically pass the last command to ai fix "$0" if they prefer.

I'm going to work on this.

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

3 participants