I'm looking for a way to do something like this:

some_tool --go-to-background http://server.com/~me/uber_vimrc ~/.vimrc

After which, reading ~/.vimrc would give the data downloaded from that URL. Read-only mapping is enough, though support for writing (through a REST API or whatever) would be cool. Is this possible with some existing utility?

The key aspect I am after is mapping individual URL to individual file from user account on demand. Needing a system daemon to support this is ok, and other schemes like ftp or scp would be ok too, does not have to be http(s).


If there's no existing utility, what would be the general mechanism to implement this myself? Symbolic link to FUSE file system which implements the network communication part comes to mind as a possible way. Is there any simpler way?

up vote 6 down vote accepted

With avfs:

mkdir ~/.avfs
avfsd ~/.avfs
ln -s ~/.avfs/'#http:server.com|~me|uber_vimrc' ~/.vimrc

For writing, you could use webdav. avfs supports a (great) number of network protocols and other methods to access files and adding more is relatively easy.

For mounting over sftp, look at sshfs.

  • Seems to work, great :). I was a bit surprised Fedora 19 didn't seem to have avfs package (or I didn't find one), but compiling it worked fine (after installing fuse-devel). – hyde Oct 25 '13 at 8:08

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.