Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
invoke zsh, having it run a command, and then enter interactive mode instead of exiting

I'm not really clear with my question here, let me rephrase it :

I've setup a launch_workspace.sh to launch directly tmux with 5 different commands loaded. Here is my current content :

#!/bin/sh

tmux new-session -d -s scube -n 'vim' "vim"

tmux new-window -t scube:2 -n 'server' "$SHELL -c 'script/rails server'"
tmux new-window -t scube:3 -n 'yard' "$SHELL -c 'bundle exec yard server --gems'"
tmux new-window -t scube:4 -n 'spork' "$SHELL -c 'bundle exec guard'"
tmux new-window -t scube:5 -n 'autotest' "$SHELL -c 'bundle exec autotest'"
tmux new-window -t scube:5 -n 'shell' "$SHELL"

tmux select-window -t scube:1
tmux -2 attach-session -t scube

Problem is : my zsh ($SHELL beeing zsh) launches said commands, but when I Ctrl+C any of these, it closes the full zsh (hence my tmux window) and not just return to a proper zsh prompt.

Is there a way to have said behavior, to launch zsh with a command and return to a zsh prompt when the command fails ?

Cheers

share|improve this question

marked as duplicate by Gilles, random Feb 22 '11 at 4:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

Ok, my mistake, it looks like this has already been answered there : invoke zsh, having it run a command, and then enter interactive mode instead of exiting

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.