diff options
| author | sigoden <sigoden@gmail.com> | 2024-03-02 08:07:06 +0000 |
|---|---|---|
| committer | sigoden <sigoden@gmail.com> | 2024-03-02 08:07:06 +0000 |
| commit | d275c33632271bf9cdbc01ef005deb9ff851370b (patch) | |
| tree | e2e924469ee752245acef4f965fca6b770ac6e03 /scripts/shell-integration/integration.bash | |
| parent | 6216b40f8c0eeaea7d47349148ede054ee4a5822 (diff) | |
| download | aichat-d275c33632271bf9cdbc01ef005deb9ff851370b.tar.gz | |
chore: move integration scripts
Diffstat (limited to 'scripts/shell-integration/integration.bash')
| -rw-r--r-- | scripts/shell-integration/integration.bash | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/shell-integration/integration.bash b/scripts/shell-integration/integration.bash new file mode 100644 index 0000000..572c7be --- /dev/null +++ b/scripts/shell-integration/integration.bash @@ -0,0 +1,7 @@ +_aichat_bash() { + if [[ -n "$READLINE_LINE" ]]; then + READLINE_LINE=$(aichat -e "$READLINE_LINE") + READLINE_POINT=${#READLINE_LINE} + fi +} +bind -x '"\ee": _aichat_bash'
\ No newline at end of file |
