diff --git a/.bashrc b/.bashrc index 04d5fa1..66ee7b5 100644 --- a/.bashrc +++ b/.bashrc @@ -1,3 +1,13 @@ export PS1="\[$(tput setaf 216)\]\u\[$(tput setaf 160)\]@\[$(tput setaf 202)\]\h \[$(tput setaf 131)\]\w \[$(tput sgr0)\]$ " export PATH=$PATH:~/.local/bin + +# Shell-GPT integration BASH v0.2 +_sgpt_bash() { +if [[ -n "$READLINE_LINE" ]]; then + READLINE_LINE=$(sgpt --shell <<< "$READLINE_LINE" --no-interaction) + READLINE_POINT=${#READLINE_LINE} +fi +} +bind -x '"\C-l": _sgpt_bash' +# Shell-GPT integration BASH v0.2