f2306a3d11
Codespell / Check for spelling errors (push) Waiting to run
Lint and Test / lint_test (3.11) (push) Waiting to run
Lint and Test / lint_test (3.10) (push) Waiting to run
Lint and Test / lint_test (3.12) (push) Waiting to run
Publish to PyPI and release / Build distribution (push) Waiting to run
Publish to PyPI and release / Publish to PyPI (push) Blocked by required conditions
Publish to PyPI and release / Make release (push) Blocked by required conditions
28 lines
626 B
Python
28 lines
626 B
Python
bash_integration = """
|
|
# 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
|
|
"""
|
|
|
|
zsh_integration = """
|
|
# Shell-GPT integration ZSH v0.2
|
|
_sgpt_zsh() {
|
|
if [[ -n "$BUFFER" ]]; then
|
|
_sgpt_prev_cmd=$BUFFER
|
|
BUFFER+="⌛"
|
|
zle -I && zle redisplay
|
|
BUFFER=$(sgpt --shell <<< "$_sgpt_prev_cmd" --no-interaction)
|
|
zle end-of-line
|
|
fi
|
|
}
|
|
zle -N _sgpt_zsh
|
|
bindkey ^l _sgpt_zsh
|
|
# Shell-GPT integration ZSH v0.2
|
|
"""
|