This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Window shortcut to launch a Mintty login bash on a given directory

On 31 July 2010 14:45, JOHNER Jean 066030 wrote:
> The last problem is that the window title, for the "My documents/foobar"
> directory becomes:
> /cygdrive/d/Documents and settings/User_name/My documents/foobar
> which iconifies to "/cygdrive/d/Docu...", the latter indication being
> the same for all directories.
> I tried:
> C:\cygwin\bin\mintty.exe -t foobar -e /bin/env CHERE_INVOKING=1
> /bin/bash --login
> to get the "foobar" window title, but at the end the complete above
> title comes back again.

The window title is changed to the working directory as part of the
shell prompt, i.e. the PS1 variable, which is set in /etc/profile.
It's the initial part of it that does it:


So you could change PS1 to something more to your liking in ~/.bash_profile.

Alternatively, you could mount (part of) the "D:/Documents and
settings/User_name/My documents/foobar" path to a shorter POSIX path
in /etc/fstab or /etc/fstab.d/$USER. See for

You might also want to consider making it your official home
directory, in which case it would be abbreviated to a tilde in the

(This isn't mintty-specific of course.)


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]