-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: rerun the command using python subprocess
When fixing a command, rerun the previously executed command and capture the output in Python code. The fish command for doing the same thing is broken.
- Loading branch information
1 parent
87a37ae
commit 646bd71
Showing
3 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env fish | ||
|
||
function _fish_ai_fix --description "Fix a command using AI." --argument-names "previous_command" "error_message" | ||
function _fish_ai_fix --description "Fix a command using AI." --argument-names "previous_command" | ||
set dir (dirname (status -f)) | ||
set output ("$dir/_fish_ai_fix.py" "$previous_command" "$error_message") | ||
set output ("$dir/_fish_ai_fix.py" "$previous_command") | ||
echo -n "$output" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters