run terminal commands from quicksilver
Asked Answered
S

3

10

I know there is a Terminal plugin for quicksilver but I would invoke terminal commands which basically just runs in the background and never popups a terminal window. is that possible?

UPDATE:

I have the following code in my applescript but its giving me an error:

do shell script "/path/to/shell.sh blah" 

error:

curses.setupterm()
_curses.error: setupterm: could not find terminfo database
Sample answered 19/2, 2011 at 1:28 Comment(0)
K
7

In Quicksilver you can use the action "Run Command in Shell", which is part of the "Terminal Module". The command is run without showing a window. Search on the quoted terms and you'll find some examples.

Kelila answered 16/2, 2012 at 22:25 Comment(0)
W
2

Applescript is the simple solution, see: http://developer.apple.com/library/mac/#technotes/tn2002/tn2065.html

Sample:

do shell script "ifconfig"
do shell script "ifconfig" user name "Anne" password "p@ssw0rd" with administrator privileges

Automator can also run shell scripts in the background.

If you are familiar with XCode, you can use NSTask with Objective-C.

Whitewood answered 19/2, 2011 at 2:5 Comment(1)
I have a shell script which I can run from a terminal and it works fine but when I try to run the same command with do shell script "/path/to/shell.sh blah" it gives me the following error curses.setupterm() _curses.error: setupterm: could not find terminfo databaseSample
B
1

Hold on a sec, is your shell script a bash shell script? In your first line do you have:

#!/bin/bash

If not, add that line to your script. Also instead of just

do shell script "/path/to/yourscript.sh"

consider this:

do shell script "/bin/bash /path/to/yourscript.sh"
Breastwork answered 19/2, 2011 at 2:45 Comment(3)
its not a long running process. I basically have a cli todo script which I wanna use quicksilver to quickly add my todo items.Sample
can you give us more info on what the todo script does?Breastwork
all it does is add items to a sqlite database. So I execute a command something like 'todo -a blah' and it adds blah to the list.Sample

© 2022 - 2024 — McMap. All rights reserved.