summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-02-26 11:28:25 +0800
committerGitHub <noreply@github.com>2024-02-26 11:28:25 +0800
commitff0ec15e065957a0da197711f6e3adfb9992325a (patch)
tree9d0d588d8365b6c850072dd69532995c63b001e7 /README.md
parentaec1b707afb1cf80ff4eb8591e1cd050fffe47b0 (diff)
downloadaichat-ff0ec15e065957a0da197711f6e3adfb9992325a.tar.gz
feat: add shell integration (#323)
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index 95476e0..b4bec44 100644
--- a/README.md
+++ b/README.md
@@ -394,6 +394,22 @@ We can also pipe the output of aichat which will disable interactive mode.
aichat -e find all json files in current folder | pbcopy
```
+### Shell integration
+
+This is a **very handy feature**, which allows you to use `aichat` shell completions directly in your terminal, without the need to type `aichat` with prompt and arguments. This feature puts `aichat` completions directly into terminal buffer (input line), allowing for immediate editing of suggested commands.
+
+![aichat-integration](https://github.com/sigoden/aichat/assets/4012553/9a9b17ea-977a-4bd8-8182-a0a96627573c)
+
+To install shell integration, run the following code:
+
+```sh
+sh_ext=bash # possible values: bash, fish, zsh, ps1
+curl -o aichat-integration.$sh_ext https://raw.githubusercontent.com/sigoden/aichat/main/scripts/integration.$sh_ext
+. aichat-integration.$sh_ext
+```
+
+After that restart your shell. You can invoke the completion with `alt+e` hotkey.
+
## License
Copyright (c) 2023-2024 aichat-developers.