Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Is there a way to interact with programs running within the opened tab? #97

Open
jannisg opened this issue Sep 27, 2012 · 0 comments
Open

Comments

@jannisg
Copy link

jannisg commented Sep 27, 2012

To setup my full work environment I would ideally like to:

  1. Tab 1: Start MongoDB
  2. Tab 2: Open the MongoDB shell (mongo)
  3. within Tab 2 we're now inside the mongo client, waiting for input.
  4. within Tab 2 I would now like to connect to my project's DB (use db_name) then authenticate via db.auth( 'user', 'pass' )

I could easily get step 1 and 2 accomplished but trying to then run code within Tab 2 is where I got stuck… is there any way this can be done?

Thanks for reading.

Below is my full script in case that helps which is run via consular start scst in Terminal.app (OSX 10.7)

# Setup the dev environment for the SCST project.
setup 'echo "setup"'

# CD into project directory
before { run 'cd ~/Sites/git/scst/scst' }

# Start MongoDB
tab "mongo_start" # note: this is an alias available in my system

# Connect to MongoDB shell
tab do
    run "mongo" # open the mongo shell
    run "use scst" # within mongo, connect to project's DB
    run "db.auth('user', 'pass')" # authenticate to this DB.
end

# Start the Play framework
tab "play run"

# Start Compass compiler process
tab "compass watch"

# Open a new tab in the correct project directory.
tab "echo 'SCST Environment is ready to go...'"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant