Open TheR1D opened 5 months ago
I have try wrote this:
function _sgpt_fish
set -l cmd (echo "$line" | sgpt --shell --no-interaction)
commandline -r $cmd
end
bind \cl _sgpt_fish
But the $line is empty, don't know how to get the input buffer in fish
I get, it work now
function _sgpt_fish
set -l cmd (commandline | sgpt --shell --no-interaction)
commandline -r $cmd
end
bind \cl _sgpt_fish
@onewesong I'd like to try it out. Where do I need to place this snipped? Does it go to ~/.config/fish/completions/ ?
@andyfr If you just want to try, you can just paste it to fish terminal
Current ShellGPT ingeration works only with Zsh and Bash. Add shell integration for Fish as well.
_Originally posted by @endolith in https://github.com/TheR1D/shell_gpt/discussions/268#discussioncomment-7777678_