From ff0ec15e065957a0da197711f6e3adfb9992325a Mon Sep 17 00:00:00 2001 From: sigoden Date: Mon, 26 Feb 2024 11:28:25 +0800 Subject: feat: add shell integration (#323) --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'README.md') 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. -- cgit v1.2.3