{"id":24,"date":"2005-08-19T15:10:31","date_gmt":"2005-08-19T19:10:31","guid":{"rendered":"http:\/\/www.red-sweater.com\/blog\/?p=24"},"modified":"2022-09-06T15:29:25","modified_gmt":"2022-09-06T19:29:25","slug":"terminal-at-my-fingertips","status":"publish","type":"post","link":"https:\/\/redsweater.com\/blog\/24\/terminal-at-my-fingertips","title":{"rendered":"Terminal at My Fingertips"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" title=\"IMG_0281-1.JPG\" src=\"marsedit:\/\/pending\/579F0728-F36F-4CA8-939E-647AA06FC9D7\/\" alt=\"IMG 0281 1\" width=\"249\" height=\"187\" border=\"0\" \/>If you&#8217;re like me, you take great comfort in the presence of the Terminal in Mac OS X. I love a great GUI, but the fact is that many tasks on the Mac are still best accomplished from the behind the wheel of a shiny new pseudo-tty.<\/p>\n<p>Usually I get the need for command-line access to an object just as I&#8217;m browsing near it in the Finder. In the bad old days, I would laboriously open the Terminal, type &#8220;cd &#8220;, then drag a copy of the item I&#8217;m interested in to the Terminal, and if it was a file, torturously edit out the leaf-name part of the path before hitting return!<\/p>\n<p><b>Grr!<\/b> I&#8217;m getting stressed out just thinking about it! Things have gotten better for me since I sat down and wrote a handy script to accomplish all of this for me. My <a href=\"http:\/\/www.red-sweater.com\/AppleScript\/TerminalAtSelection.zip\"><i>Terminal At Location<\/i><\/a> script does just what its title implies: opens a new terminal window with the current path set to the object of your current Finder-fixation. You can download this script from the Red Sweater <a href=\"http:\/\/www.red-sweater.com\/AppleScript\/\">AppleScript Page<\/a>.<\/p>\n<p>I have this script configured as an application-specific keyboard shortcut for the Finder. Whenever I need to &#8220;switch to command-line mode&#8221; I just hit <b>Cmd-Shift-T<\/b> and I&#8217;m off-and-running. If you don&#8217;t already have an application-specific keyboard shortcut tool for quickly running AppleScripts, then allow me to give my unbiased (ahem) endorsement of <a href=\"http:\/\/www.red-sweater.com\/fastscripts\/\">FastScripts<\/a>. Create a Finder-specific scripts folder, drop the script in, and select it from the FastScripts menu while holding down the Cmd key to quickly set your desired shortcut.<\/p>\n<p>If you spend a lot of time switching between the Finder and the Terminal, you will not forgive yourself for failing to set up a script like this sooner.<\/p>\n<p><b>Update:<\/b><a href=\"http:\/\/www.red-sweater.com\/AppleScript\/TerminalAtSelection1.0.1.zip\">Version 1.0.1<\/a> of the script fixes a bug that caused terminal parsing errors for paths with funny characters in them.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"IMG_0281.JPG\" src=\"marsedit:\/\/pending\/671C01C2-8EA5-4C7E-BCC0-8DF0295E3DA4\/\" alt=\"IMG 0281\" width=\"249\" height=\"187\" border=\"0\" \/><img loading=\"lazy\" decoding=\"async\" title=\"IMG_0281.JPG\" src=\"https:\/\/redsweater.com\/blog\/wp-content\/downloads\/2022\/09\/IMG_0281-2.jpg\" alt=\"IMG 0281\" width=\"249\" height=\"187\" border=\"0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re like me, you take great comfort in the presence of the Terminal in Mac OS X. I love a great GUI, but the fact is that many tasks on the Mac are still best accomplished from the behind the wheel of a shiny new pseudo-tty. Usually I get the need for command-line access [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,6],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-applescript","category-fastscripts"],"_links":{"self":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":1,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"predecessor-version":[{"id":3892,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/24\/revisions\/3892"}],"wp:attachment":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}