Jump to content
winterflags

How to paste File Filter path into Terminal Command

Recommended Posts

I have created a small workflow that uses a File Filter to match the name of a directory (public.folder), and then open it in Finder when pressing Enter.

 

However, I also want to open Terminal and go to that path (cd ~/my/folder).

 

Is it possible to somehow paste the query result from the File Filter, into a Terminal Command, in the workflow?

Share this post


Link to post

Okay, I actually solved this myself within a few minutes after posting the question, d'oh.

 

What you do, is add a Terminal command. And type in cd {query}.

 

To make it work with path names that have whitespace in them (space bar), mark the checkbox Escaping: Spaces.

Edited by winterflags

Share this post


Link to post

To be absolutely correct, use "{query}" (i.e. in double quotation marks) and select Escaping options Backquotes, Double Quotes, Backslashes, Dollars.

 

Anything else, and some input could break it.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...