Jump to content

Make quicklookurl also work with filepaths


deanishe

Recommended Posts

The new-ish quicklookurl feature in the JSON feedback only works with URLs.

 

The "standard" Quick Look feature (i.e. using arg) also works with filepaths.

 

IMO, quicklookurl should also work with filepaths. It's a very handy feature, and not having it reduces the utility of quicklookurl considerably.

Link to comment
Share on other sites

I know, but that's quite a bit more complicated than using the filepath. Languages other than ObjC don't have all the convenience methods for turning paths into URLs and vice versa. You have to start messing around with network libraries instead, and I wouldn't know where to start trying to percent-encode something in bash.

Link to comment
Share on other sites

21 hours ago, deanishe said:

I wouldn't know where to start trying to percent-encode something in bash.

 

For future reference:

perl -MURI::Escape -ne 'print uri_escape ($_)' <<< "{{input_text}}"

 

And for the reverse:

perl -MURI::Escape -ne 'print uri_unescape ($_)' <<< "{{input_text}}"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...