On 08/05/08 17:40 -0700, Gary Johnson wrote:
>
> I don't know the history or rationale behind the current
> implementation of sh_vimglob_func, but it seems odd that the first
> echo is given the -n option to suppress the final newline, then a
> second echo is used to create a newline in the same place. The
> solution, therefore, seems to be to eliminate the -n option to the
> first echo command and eliminate the second echo command completely.
> The resulting initial value of sh_vimglob_func is
>
> vimglob() { while [ $# -ge 1 ]; do echo "$1"; shift; done }; vimglob >
>
I think you are right. Originally, the second 'echo' was intend to
suppress an '\0' at the end of each matched items for working on many
kinds of POSIX shells. As the record is now considered NL separated, the
additional echo is not necessary.
I tested your version of vimglob() on OBSD with ksh, fine.
--
Dasn
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---