Executing commands in Terminal

General discussions about LaunchBar
Post Reply
factoryjoe
Posts: 9
Joined: Tue Dec 16, 2008 12:18 am
Contact:

Executing commands in Terminal

Post by factoryjoe » Tue May 12, 2009 9:50 am

I searched this forum for similar posts, but only found a topic on executing shell scripts, not commands.

In LBv5, if I activate LaunchBar and proceed to type (starting with "."), everything I type is always treated as a URL location, rather than as text, even if I tab and select "Run Terminal Command". The basic problem is that all text input is expected to be a web address.

Is it possible to disable this default setting, or to otherwise execute terminal commands from LaunchBar?

In particular, I would like to execute commands like:

Code: Select all

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
killall Finder

sjk
Wizard
Wizard
Posts: 315
Joined: Thu Sep 13, 2007 9:46 pm
Location: Eugene
Contact:

Re: Executing commands in Terminal

Post by sjk » Tue May 12, 2009 10:10 am

Look under the General tab of Preferences.

factoryjoe
Posts: 9
Joined: Tue Dec 16, 2008 12:18 am
Contact:

Re: Executing commands in Terminal

Post by factoryjoe » Tue May 12, 2009 10:34 am

Ah ha, I see!

Image
Click for full size - Uploaded with plasq's Skitch

So... how then do I get into typing mode if I select "Never"?

sjk
Wizard
Wizard
Posts: 315
Joined: Thu Sep 13, 2007 9:46 pm
Location: Eugene
Contact:

Re: Executing commands in Terminal

Post by sjk » Tue May 12, 2009 6:17 pm

Not sure how you're defining "typing mode". Have you checked the help file?

Dennis
Rank 3
Rank 3
Posts: 146
Joined: Mon Dec 10, 2007 7:47 pm
Location: California

Re: Executing commands in Terminal

Post by Dennis » Tue May 12, 2009 6:57 pm

If the current item on the bar is a directory location, you can hit Option-Command-T for "Run Terminal Command Here..." and Shift-Command-T for "Run Terminal Command With...". Is that what you're looking for?

-Dennis

factoryjoe
Posts: 9
Joined: Tue Dec 16, 2008 12:18 am
Contact:

Re: Executing commands in Terminal

Post by factoryjoe » Tue May 12, 2009 8:36 pm

sjk wrote:Not sure how you're defining "typing mode". Have you checked the help file?


I did take a look at the Help file, but, alas, it was not helpful. Perhaps my mental model does not map to how LaunchBar works... :?

Dennis wrote:If the current item on the bar is a directory location, you can hit Option-Command-T for "Run Terminal Command Here..." and Shift-Command-T for "Run Terminal Command With...". Is that what you're looking for?


That's not really what I'm looking to do. The simplest example would be:

  1. switch to text-entry/typing mode (does that even exist? It does in Quicksilver!)
  2. enter 'killall Finder" (the command to restart Finder)
  3. hit tab and select "Run command in Terminal"; hit enter
Since I can't seem to get into a non-URL text-input interface, I seem to be stuck at the first step, let alone picking an action that would fire up Terminal and execute my command.

Dennis
Rank 3
Rank 3
Posts: 146
Joined: Mon Dec 10, 2007 7:47 pm
Location: California

Re: Executing commands in Terminal

Post by Dennis » Tue May 12, 2009 8:54 pm

factoryjoe wrote:switch to text-entry/typing mode (does that even exist? It does in Quicksilver!)


It does exist in LaunchBar: type "ET" or a similar abbreviation to find the "Enter Text" command.

But you don't really need it in LaunchBar because you can enter text directly in the "Run Terminal Command" action:

  1. Type "RTC" or whatever abbreviation you want to find the "Run Terminal Command" action.
  2. Hit the spacebar and enter your command.
  3. Hit return to execute

-Dennis

factoryjoe
Posts: 9
Joined: Tue Dec 16, 2008 12:18 am
Contact:

Re: Executing commands in Terminal

Post by factoryjoe » Tue May 12, 2009 10:25 pm

Ah ha! Excellent -- that's just what I needed! Thanks Dennis!

Post Reply