Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to start new Cygwin window with running alias in it. Opening new window is:

cygstart /bin/bash -li 

(Thanks to: Spawn New Cygwin Window from Within Cygwin)

But how can I send alias in that new Cygwin window? (alias compile="./ant compile")

cygstart /bin/bash -li ./ant compile

Current statement open new bash window and run command there, but not in new cygwin window.


share|improve this question

I know is old but the answer is:

cygstart --directory=${pwd} /bin/bash -li -c \"./ant compile\"

The escaped quotations mark are needed to pass the command to bash.

share|improve this answer

Use the -c switch to pass commands for bash to run, like so:

cygstart /bin/bash -li -c ./ant compile
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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