Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

A Remedy for the Typesafe Activators Messes up my Cygwin Terminal

DZone's Guide to

A Remedy for the Typesafe Activators Messes up my Cygwin Terminal

Using the Type Activator activator command causes the Cygwin terminal to become invisible when using the Play framework. Here's how to fix the problem.

· Java Zone ·
Free Resource

The CMS developers love. Open Source, API-first and Enterprise-grade. Try BloomReach CMS for free.

Using the Type Activator activator command causes the terminal to become invisible.
This bug actually existed in Play Framework 2 and even earlier. It is still around today and it is really annoying when using Cygwin Terminal!

My solution is to write a custom BASH script called myactivator:

#!/bin/bash
myname=`basename $0`
## PrefixCmd='echo =>'
${PrefixCmd} trap "stty erase" EXIT SIGINT SIGTERM SIGHUP
${PrefixCmd} activator "$@"
status=$?
${PrefixCmd} stty sane
echo "Exit Status: $status"
exit $status

My script wraps the Typesafe activator shell script and when it terminates, it resets the UNIX terminal to a sane state again.


Place this in your ~/bin folder and add the folder to your PATH environment variable.
You also need to make sure it is runnable with chmod 755 ~/bin/myactivator.

Now you can type myactivator clean and myactivator test, etc



BloomReach CMS: the API-first CMS of the future. Open-source & enterprise-grade. - As a Java developer, you will feel at home using Maven builds and your favorite IDE (e.g. Eclipse or IntelliJ) and continuous integration server (e.g. Jenkins). Manage your Java objects using Spring Framework, write your templates in JSP or Freemarker. Try for free.

Topics:
java ,cygwin ,play framework

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}