X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Sun, 17 Aug 2008 16:50:10 +0400 From: Andry X-Mailer: The Bat! (v3.0.1.33) Professional Reply-To: Andry Message-ID: <1164057241.20080817165010@inbox.ru> To: cygwin AT cygwin DOT com Subject: Cygwin.bat doesn't save original directory in OLDPWD after login MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hello cygwin, If run cygwin from cmd.exe from random directory, for example, from "c:\blablabla", then after login OLDPWD would be "/usr/bin" instead original directory. So command cd "$OLDPWD" just after login restores wrong directory. This is because batch file has been wroten incorrectly. This is correct: "%~dp0bin\bash" --login -i -- Best regards, Andry mailto:andry AT inbox DOT ru -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/