Jump to content

Workflow to Open Terminal and Set Working Directory

Recommended Posts

As a new Powerpack user, I've been downloading several great workflows that I'm already using many times a day.  However, a workflow I couldn't find is one that opens a terminal window and sets the current working directory based the results of an Alfred query.


So I created my own and I'm sharing it here in case others find it useful.


What it Does:

Opens a new terminal window and sets thw current working directory based on an Alfred query that only considers folder names.


Link to Workflow:



Dependencies or System Modifications:







Link to comment
Great idea.


There's a bug in the code, however:


do script "cd " & q


breaks if there's a space in the directory path. It should be:


do script "cd " & quoted form of q


I changed mine to read:


do script "cd " & quoted form of q & "; clear"


so that the cd command is not visible in the terminal.

Link to comment

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...