I Love Quicksilver’s quick file path retrieval

Why would I need this?

How many times do you need a file path? Formatted a specific way? POSIX for Terminal, Mac for AppleScript, and URLs for the internet.

Enter Quicksilver‘s realm, where one application gets you your file path in whatever format you like. (It’s nirvana.)

How do I …

Get An Absolute POSIX Path

Quicksilver‘s default is an absolute POSIX path. In fact you don’t even have to explicitly request it. For example, below, we’ve chosen a file. (If your Quicksilver looks different, I’m using the default interface, but I’ve changed the colors in Preferences > Appearance.)

1114_01_qs_pane_01

Next, we tab over to the second pane and type paste until the Paste action appers. (We only had to type p in this case.) Then we’ll press enter and Quicksilver will paste our file path into the current application. If it can’t, Quicksilver will bonk at us.

1114_02_qs_pane_02

We started Quicksilver while in TextEdit, and that’s where Quicksilver has put our path.

If we were pasting this into Terminal, we would definitely want to type a quote before activating Quicksilver, then type a closing quote after pasting because there are spaces in our file path.

1114_03_te_abs_posix

Get A File URL

Starting from a TextEdit document, we activated Quicksilver, selected a file in our first pane, pressed tab to go to our second pane, then typed furl to select the Get File URL action.

1114_04_qs_pane_02

When we press enter, Quicksilver looks like it’s done absolutely nothing at all with our command:

1114_05_qs_pane_01

It has performed our command, but we have to do something with it to see it. (Bad UI!) We could copy it to the clipboard by pressing tab to go to the second pane, typing copytoclipboard or some part thereof (below, we used clip), and then pressing enter.

1114_06_qs_pane_02

That’s one option you probably won’t need often, as the Paste action takes care of most scenarios where you would need to copy and paste.

Instead, we’re just going to paste it into our waiting TextEdit document. To select a different action than copy, press backspace and then type paste. (Pressing backspace deletes what you’ve already typed so you can type something new.)

1114_07_qs_pane_02

And there’s our encoded file URL.

1114_09_te_file_url

Get POSIX Paths (Absolute and Relative)

Again, while in TextEdit, we activated Quicksilver, selected a file, pressed tab to go to our second pane. Even though Quicksilver’s default is an absolute POSIX path, there is a Get Absolute (POSIX) Path action, which we’ve selected by typing abs.

1114_10_qs_pane_01

When we press enter, Quicksilver returns with our path as text in the first pane. In the screenshot below, we’ve already moved into the second pane and selected the Paste action.

1114_11_qs_pane_02

Pressing enter gives us the absolute POSIX path.

1114_12_te_abs_posix

To get a relative POSIX path, we’ve again selected a file, pressed tab to go to our second pane, and this time we’ve typed get and pressed down arrow to see the results. (Waiting a little will also display the results.)

We resized the results display to see more. There are quite a few actions related to getting file paths. (There’s even a Get Info action, which is the same as Finder > File > Get Info.) Each action has a little description below it, describing what it does. We’ve selected Get Path.

1114_13_qs_pane_02

Pressing enter puts our file path as text into the first pane. Below, we’ve already moved into the second pane and begun typing paste, getting as far as p. (Gotta love an app that reads your mind.)

1114_14_qs_pane_02

And when we press enter, Quicksilver adds our path to our TextEdit document. (Note that we had to add the line break ourselves. Quicksilver will not automatically do that.)

1114_15_te_posix_paths

Get A Mac/HFS File Path

I find myself using this type often, mostly for AppleScript. This time, instead of activating Quicksilver while in TextEdit, we’ve done so from AppleScript Editor, after typing an opening quote (because we’ll need to enclose the file name in quotes).

Below, you can see we’ve selected a file, typed tab to go into the second pane (you can also click the pane with your mouse or trackpad), and typed gloc to select the Get File Location action.

1114_16_qs_pane_02

When we press enter, our file path is entered into our waiting script. Typing another quote encloses it; we’ll assign it to a variable later.

1114_17_ase_hfs_path

Quicksilver. What can’t it do?

Why doesn’t it work on my Mac?

Note that in order to use these actions, you need to install the following plugins and you may need to change your Quicksilver preference settings:

  • (No plugins needed.)

You may need to enable certain actions via Preferences > Actions. Below, we’ve chosen to view actions by Type, and further filtered for Files & Folders actions. We also searched this filter for actions containing the word get.

Quicksilver may not have all of these actions enabled by default. You will want to enable the actions you plan to use.

1114_18_qs_prefs_actions

Wow/Meh. What else ya got?

This is part of a series of some of the ways I love and use Quicksilver. If you’re new to Quicksilver, check out the Quicksilver Setup Mini Guide for tips on configuration.

14. November 2014 by sojourner hardeman
Categories: geekery, how do i love thee quicksilver | Leave a comment

Leave a Reply

Required fields are marked *