> If there is a problem, please spell it out as the above is correct.
I don't know how many bugs about short name in vim.
I found a bug about home_replace() in the first, In next, I found
fnamemodify().
home_replace() is used in :scriptnames, or fnamemodify(x, ':~') or etc.
Or do you mean "You should change subject of this thread" ?
> > What we want is full long path. Currentl, :p don't return
> > long full long path.
>
> That's why I said *if* :p always produced the expanded long
> name, then :p:8 would be all that was needed to produce the
> equivalent short name.
We need long path, not short name. In some times, file name has an
important thing about `What is this`. Short name break them. For example,
:let filename = s:get_vimrc_filename_from_somewhere()
:if filename =~ '[/\][._]vimrc$' " is .vimrc or _vimrc ?
: call s:do_something_about_vimrc()
:endif
If `s:get_vimrc_filename_from_somewhere` return short path name(for example
output from external program),
We can't expand long path. Please try following.
:let shortname = fnamemodify('~/.vimrc', ':p:8')
:echo shortname
c:/docume~1/mattn/VIMRC~1
:echo fnamemodify(shortname, ':p')
c:/docume~1/mattn/VIMRC~1
Then, the code above don't pass into doing `s:do_something_about_vimrc`. And
also, we can't know .vimrc become 'vimrc~1' or 'vimrc~2' or others in 8.3
format rules.
> If :p produced the expanded long path, would there be a need for
> any further changes? Why?
I didn't answer for bram's question yet(About whether need to add new modifier
or not).
I don't want to change behavior of :p. And I want to add new modifier to expand
short name. We can call resolve() in manually, we can call fnamemodify() too.
Bram, how do you think?
--
You received this message from the "vim_dev" 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