Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: prefix for "file:" URL's



On Jul 8,  1:54pm, Vincent Lefevre wrote:
} 
} For instance, the = prefix allows to transform a command name into
} the corresponding aboslute pathname. In a similar way, could there
} be a prefix to transform a pathname into a "file:" URL?

I think we're running out of characters available for this sort of
thing.  The only one that might be left is "@" but that potentially
conflicts with kshglob syntax.  I guess "file:://.../(" is rare
enough that we could ignore that, but it'd still need an option to
control it and that option must be off by default.

} Alternatively, one could define a binding to add file://$PWD/ in
} the command line (before typing the end of the URL) but completion
} support should be added too.

Actually completion seems to me to be exactly the right place for
this.  It shouldn't be too difficult to modify the _urls completion
function to have it notice local files and insert file://$PWD/, and
then you can create the "convert word to URL" key binding from that.



Messages sorted by: Reverse Date, Date, Thread, Author