On Fri, 01 Nov 2002 23:19:51 +0000, Bram Moolenaar wrote:
> Nikolai Weibull wrote:
> > finally, here it is, the function we've all had wet dreams about!
> > the function to put an end to all other functions!
> > for only $9.95 it can be yours!
> > seriously, i got around to writing some code for the function
> > 'user_fullname()' which may actually be rather useful in quite a few
> > scripts. most notably it goes perfect with the ftplugin/changelog.vim
> > file that i maintain. a patch to src/eval.c and to runtime/doc/eval.txt
> > is included.
> Hmm, I wonder how useful this is. It only works on Unix (and not all
> kinds of it). Could use a shell command on these systems.
true. sadly i haven't found a way to do it on other systems. should be
possible on some forms of Windows based platforms, and i'm sure some
versions of Mac OS have some functionality for this as well. i was
hoping that people would fill in the blanks sort of. I have two plugins
that would benefit from this functionality. first,
ftplugin/changelog.vim that uses the fullname in the log header. and
second, plugin/pcpheader.vim that uses the fullname of the user when
creating headers from template files where the Author:/Maintainer: needs to
be set. Ok, it's not as useful as substitute() or many other functions,
but i believe it has its uses.
> If it's really to be included, it requires a few #ifdefs. For example,
> see the use of getpwuid() in os_unix.c.
done. for systems that don't provide the getpwuid() functionality, then
at least the NAME environment variable is checked.
> > P.S.
> > i also fixed some bugs in runtime/doc/eval.txt. (see the patch for what
> > was fixed.)
> I'll include these right away.
::: name: Nikolai Weibull :: aliases: pcp / lone-star :::
::: born: Chicago, IL USA :: loc now: Gothenburg, Sweden :::
::: page: http://pcppopper.org/
:: top ref: google "pcp rocks" :::