Open new Cygwin window with executing alias from current window

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!

Henry

Posted 2012-03-16T18:00:54.750

Reputation: 1

Answers

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.

Robert Paasche

Posted 2012-03-16T18:00:54.750

Reputation: 11

0

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

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

me_and

Posted 2012-03-16T18:00:54.750

Reputation: 2 118