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: RFC: 1.7.33 problem with user's home directory


On Nov 28 19:08, Andrey Repin wrote:
> > If we implement the above, we
> > would just have to add a cmd wrapper script in /bin to make sure
> > $PATH is set correctly and to make sure CMD starts up in $HOME,
> > something along the lines of:
> 
> >   $ cat /bin/cmd
> >   #!/bin/dash
> >   PATH=/bin:$PATH
> >   cd $HOME
> >   # Don't rely on COMSPEC!
> >   cmd=$(cygpath -ua "${SYSTEMROOT}\\System32\\CMD.EXE")
> >   exec "${cmd}"
> 
> I hope you don't expect it to work inside mintty.

Oh, it does.  CMD itself isn't the biggest problem, many other native
tools are.

> Cygwin tools may function
> properly in this case, but the shell itself - I have my doubts. And other
> native tools would certainly have issues with encoding, if not with any output
> at all.
> Said that, it would need to be a simple .cmd file, so that it'd run in native
> console.
> Something like
> 
> @ECHO OFF
> PATH=%~dp0;%PATH%
> START "" /B "%SystemRoot%\System32\cmd.exe" /K
> EXIT

Fine with me, but it also has to cd to %HOME%, which is given in
POSIX syntax...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpzwO6IFHYKW.pgp
Description: PGP signature


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