0

I have a bash alias to move into a project folder, start screen, and pull new changes from git.

it looks like this:

alias start_manager2='cd ~/programming/manager2/ && screen -t "main" bash -c "cd main && ./tools/fetch.sh"'

this 'works' - in that all of the commands are run, and I can see that screen is starting with a window entitled 'main', but as soon as the fetch script is done running, screen terminates. What am I doing wrong here?

solution

alias start_manager2='cd ~/programming/manager2/ && screen -t "main" bash -c "cd main && ./tools/fetch.sh; bash -l"'
1

Add a ; read -p "Finished. Press Return. before ".

  • that prints finished, but pressing return still terminates screen – dax Oct 23 '14 at 8:45
  • If you want a bash add ; bash -l before ". – Cyrus Oct 23 '14 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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