To reproduce:
let $HOME='my/home'
echo fnamemodify('my', ':~')
my ✅echo fnamemodify('my/home/dir', ':~')
~/dir ✅echo fnamemodify('my/home', ':~')
~/ ❌~In the last case, why does it print a trailing slash (~/)?
I only expect the trailing slash if the path passed into fnamemodify itself has trailing slash e.g. my/, my/home/dir/, my/home/.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
@Asheq ,
Is this still an issue? This was posted 5 years ago approximately. If you still have the issue, what version of vim are you running and on which OS?
Also, have you checked the help for fnamemodify() and filename-modifiers? Some interesting clues in there.
Thanks.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #3524 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
can no longer reproduce on Vim 9.0.078 but on an old 8.1.3741.
So closing, assuming it has been fixed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()