0

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.

Thanks!

2 Answers 2

1

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.

0

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

cygstart /bin/bash -li -c ./ant compile

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .