Starting bash in directory

Maurício briqueabraque@yahoo.com
Thu Jan 23 18:13:00 GMT 2003


Harald Kierer wrote:
>> Cygwin installation creates a shortcut that runs bash like this:
>>>>bash -i --login
>>>> However, I would like to start bash so that after starting 
>>it would 
>>go to a specific directory. For instance, I would like to run 
>>something 
>>like:
>>>>bash -i --login "cd d:\users"
>>>>so that bash would start and then execute "cd d:\users" 
>>before the user 
>>starts typing anything. This would be equivalent to the WinNT command:
>>>>cmd /k "cd d:\users"
>>>> Do you guys know if that's possible?
>>> The bottom line of "/etc/profile" says "cd $HOME". Just change it to
> what you want.
> cd /cygdrive/d/users
>>> Bye,
> Harry
>
 The problem is that I want to pass diferent directories each time. My 
final intention is to create a shell extension so that users could right 
click a directory and select "Open bash here". To do that, I need to 
give Windows a command like this:
bash_command %1
(and Windows will change %1 for a given directory).
 Do you imagine what bash_command.bat could be so that it could 
execute bash -i --login and then have it to go to the given directory?
 Maurício
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /