1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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" } ] } )