From f82f577b6dd65c973d96faa2df7682538b517119 Mon Sep 17 00:00:00 2001 From: sigoden Date: Thu, 7 Mar 2024 06:31:23 +0800 Subject: feat: add nushell integration (#344) --- scripts/shell-integration/integration.nu | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/shell-integration/integration.nu (limited to 'scripts/shell-integration/integration.nu') diff --git a/scripts/shell-integration/integration.nu b/scripts/shell-integration/integration.nu new file mode 100644 index 0000000..291f287 --- /dev/null +++ b/scripts/shell-integration/integration.nu @@ -0,0 +1,21 @@ +def _aichat_nushell [] { + let _prev = (commandline) + if ($_prev != "") { + print '⌛' + commandline edit -r (aichat -e $_prev) + } +} + +$env.config.keybindings = ($env.config.keybindings | append { + name: aichat_integration + modifier: alt + keycode: char_e + mode: [emacs, vi_insert] + event:[ + { + send: executehostcommand, + cmd: "_aichat_nushell" + } + ] + } +) \ No newline at end of file -- cgit v1.2.3