Often I need a combination of multiple commands e.g. with grep / jq etc.
For this ChatGPT outputs correct commands with pipes, but they don't work with ai-shell since it just executes one process without the shell support for pipes. Since execa is used this can simply be fixed by using the shell-flag.
Thanks for this cool tool!
Often I need a combination of multiple commands e.g. with grep / jq etc. For this ChatGPT outputs correct commands with pipes, but they don't work with
ai-shell
since it just executes one process without the shell support for pipes. Sinceexeca
is used this can simply be fixed by using the shell-flag.See https://github.com/sindresorhus/execa#shell-syntax and https://github.com/sindresorhus/execa#shell for more information.
Here is an example for a perfectly fine command which works when pasted directly into bash or zsh but doesn't work with ai-shell: