It's impossible. What @Prince Goulash has in mind is a simple vim fill in of the file name. If you know how to get bash to use pipe termination options somewhere, you can create a termination function for the user command, which can, in turn, call the built-in :! but completion override for built-in commands is not possible.
I personally donβt know how to do it with bash and I know that trying to do it in zsh leads to dirty hacks overriding zsh built-in commands (like compadd ) using pexpect (python), Expect (perl), expect (tcl) , zsh / zpty or something similar to launching the shell interactively and inventing the IPS mechanism zsh-> vim (in the opposite direction it is much easier) (I once started working on a similar module for zsh, but stopped because it was too many problems).
source share