* Peng Yu [2011.11.08 12:20]:
> I'm editing a bash script. It will be convenient if I can complete
> command that find in PATH. I'm sure that there is a way to do so.
> Could any expert let me know how to do it? Thanks!

One way would be to generate a list of all the
programs in PATH and use dictionary completion.

On *nix platforms this would be one way to
generate the list:

--------------- %< ----------------
#!/bin/sh
IFS=:
for dir in $PATH
do
   ( cd $dir && printf "%s\n" * )
done > /tmp/program-list
--------------- %< ----------------

Then in vim:

:set dictionary=/tmp/program-list

And complete with CTRL-X_CTRL-K

-- 
JR

-- 
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