Probably not exactly what you're looking for, but Warp (a new terminal client) has "AI Code Search" built in that's powered by GPT-3. Quite useful for someone like me who tends to avoid the terminal when I can.
Integrating into a shell, for immediate execution, seems very very dangerous. You still need to carefully test/scrutinize everything that comes from copilot.
Sometimes, with variable results. I think I've only observed it guess patterns from the current directory
> Does copilot work for shell scripts?
Yes, it gave me this earlier today while editing my .zshrc: