Hello folks,

I've written a command that will replace the contents of a buffer with
the output of a shell command.

I'd like to have it provide completion as similar as possible to that
used by bash itself.  Ideally, I would like it to use the bash
completions themselves, presumably by spawning a subshell.  A fallback
(for compatibility, speed, or practicality) would be to use the same
sort of completion provided by vim's `:!` command.  This seems to work
by doing command-name completion on the first word and filename
completion (and escaping) on subsequent words.

I have tried using `-complete=shellcmd`, but this only seems to
complete command names and does not progress to completing filenames
after the first word.

I've also looked into hooking into bash to have it handle completion;
there does not seem to be a straightforward way to do this, either.
Here, the complications are due to what seems to be a lack of features
in bash itself, so any advice is likely somewhat off-topic, but
nonetheless welcome :)

Is there an addon or a wiki page which provides such feature or a
recipe to implement it?

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to