> Thanks for you answer! It appears that I've made some kind of mistake
> with this simplified example, cause findfile('symfony','.') actually
> finds this file in main sshfs-project directory. Upward searching
> still doesn't work though. Let me illustrate this with commands:
>
> :pwd
> /srv/http/wnb_remote <-- sshfs project
>
> :!ls sym*
> symfony
>
> :echo findfile('symfony', '.')
> symfony
>
> :echo findfile('symfony', '.*;')
> /srv/http/iprzychodnia/symfony <-- PROBLEM
Hmm. All of findfile() was new to me before this thread. It appears I
misinterpreted '.*;' as the {path} parameter. If I've got it right,
now, it works in the opposite order:
Since it ends with ';':
It will progressively strip trailing directories until it reaches '/'.
Since it starts with '.*':
At each level, it will try directories matching /.*/.
> :cd /srv/http/iprzychodnia <-- regular project
> :!ls sym*
I don't understand how it would produce:
/srv/http/iprzychodnia/symfony
...if there's no file by that name.
Perhaps your shell is cd'ing somewhere before `ls` is being run? (Seems
unlikely, but otherwise I have no idea how to explain the lack of output
if symfony indeed exists.) Is there a 'symfony' file in
/srv/http/iprzychodnia/ if you do:
:e .
(i.e. open NetRW in the current dir)
> :echo findfile('symfony', '.')
> symfony
>
> :echo findfile('symfony', '.*;')
> symfony <-- works as expected
>
> But considering what you've written before I am not sure this is sshfs
> related. No other ideas though.
--
You received this message from the "vim_use" 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
No comments:
Post a Comment