-function! whereami#do(fmt) abort
- let fullpath = expand("%:p")
- if fullpath[:len(g:whereami_pwdP)-1] ==# g:whereami_pwdP
- let fullpath = g:whereami_pwdL . fullpath[len(g:whereami_pwdP):]
+export def PwdLoad()
+ g:whereami_pwdL = trim(system("pwd -L"))
+ g:whereami_pwdP = trim(system("pwd -P"))
+enddef
+
+export def Do(fmt: string)
+ var fullpath = expand("%:p")
+ if fullpath[ : len(g:whereami_pwdP) - 1] ==# g:whereami_pwdP
+ fullpath = g:whereami_pwdL .. fullpath[len(g:whereami_pwdP) : ]