public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* error in bash's cd command
@ 2001-03-28 16:09 Glen Coakley
  2001-03-28 16:28 ` Christopher Faylor
  0 siblings, 1 reply; 2+ messages in thread
From: Glen Coakley @ 2001-03-28 16:09 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

[-- Attachment #1: Type: text/plain, Size: 1506 bytes --]

[administrator@GCP36W2K /]$ cd  "/d/cygwin/usr/local/bin "
                             ### Why does this work with the space in there?
[administrator@GCP36W2K /d/.../usr/local/bin]$ echo "'`pwd`'"
'/d/cygwin/usr/local/bin '   ### Note: there is a trailing space in the path
[administrator@GCP36W2K /d/.../usr/local/bin]$ ls
                             ### ls cannot find any files
[administrator@GCP36W2K /d/.../usr/local/bin]$ cd `pwd`
[administrator@GCP36W2K /d/.../usr/local/bin]$ ls
bc.exe*  cygwin_indir.bat*  echoping.exe*
[administrator@GCP36W2K /d/.../usr/local/bin]$


I noticed this problem because I wanted to set up a right-click action in
the shell similar to the "Command Prompt Here" power toy that you get from
Microsoft. So, I edit the Registry to call a DOS batch file passing it the
current directory name. The batch file converted that to a Unix path that
Cygwin bash could use and output that to a file. Then when the bash shell
starts it checks for that file and changes to the directory in it (if it
exists). Unfortunately, Windows 2000 puts a trailing space in the "%1" that
is passed from a right click-invoke command on file operation, even though I
have it double-quoted. I am guessing that ls is passing a directory path
ending with a space to opendir() which fails. 


 <<cygnus_info>> 
________________________________
Glen Coakley, Sr. Software Engineer
MQSoftware Inc., (763) 543-4845
Have you ever wonder what happens when you run "rm -rf / " but been afraid
to try it?


[-- Attachment #2: cygnus_info --]
[-- Type: text/x-Algol68, Size: 9538 bytes --]


Cygnus Win95/NT Configuration Diagnostics
Current System Time: Wed Mar 28 16:42:57 2001

WinNT Ver 5.0 build 2195 Service Pack 1

Path:	/usr/local/bin
	/usr/bin
	/bin
	/C/WINNT/system32
	/C/WINNT
	/C/WINNT/System32/Wbem
	/usr/bin
	/D/Program Files/Security/PGPNT
	/D/PROGRA~1/DEVELO~1/Tcl/bin
	/D/Program Files/MQSeries/bin
	/D/Program Files/MQSeries/tools/c/samples/bin
	/D/Program Files/Development/GNU/WinCVS 1.1
	/C/Program Files/Borland/Common Files/Bde
	/D/DB2_SQLLIB/BIN
	/D/DB2_SQLLIB/FUNCTION
	/D/DB2_SQLLIB/SAMPLES/REPL
	/D/DB2_SQLLIB/HELP
	/D/IMNNQ_NT
	/C/Program Files/Resource Pro Kit/
	/D/Program Files/Development/Visual Studio/Common/Tools/WinNT
	/D/Program Files/Development/Visual Studio/Common/MSDev98/Bin
	/D/Program Files/Development/Visual Studio/Common/Tools
	/D/Program Files/Development/Visual Studio/VC98/bin
	/D/Dev/ACE+TAO_5.1.12/bin
	/usr/local/bin
	/usr/bin
	/D/Util/Perl/bin
	/D/Util
	/D/Program Files/Development/Modula3/m3build/templates/bin
	/D/Dev/Packages/bin
	/D/Dev/Packages/dll

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

USER = `administrator'
HOME = `/home/administrator'
CYGWIN = `nobinmode'
PWD = `/D/cygwin/usr/local/bin '
MAKE_MODE = `unix'

DIRCMD = `/a/ogne/x'
MACHTYPE = `i686-pc-cygwin'
ENV_SPACE = `12345678901234567890123456789012345678901234567890'
PROGRAMFILES = `C:\Program Files'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
LOGONSERVER = `\\MQNEXUS'
ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
HOSTNAME = `GCP36W2K'
SHLVL = `1'
MSDEVDIR = `D:\Program Files\Development\Visual Studio\Common\MSDev98'
OLDPWD = `/D/cygwin/usr/local/bin '
LESS = `-seqafix8XP?f%f:-- More --.\ ?pB(%pB\%).'
GZIP = `-N'
INCLUDE = `D:\Program Files\Development\Visual Studio\VC98\atl\include;D:\Program Files\Development\Visual Studio\VC98\mfc\include;D:\Program Files\Development\Visual Studio\VC98\include'
SYSTEMDRIVE = `C:'
PROMPT = `$P$G'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 3, GenuineIntel'
PS1 = `\[\033]0;\w\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$ '
DB2TEMPDIR = `D:\DB2_SQLLIB'
PROCESSOR_REVISION = `0803'
USERDOMAIN = `MQSOFTWARE'
PROCESSOR_ARCHITECTURE = `x86'
IMNINSTSRV = `D:\IMNNQ_NT'
_ = `/home/administrator/scripts/cygnus_info'
TEMP = `/C/DOCUME~1/gcoakley/LOCALS~1/Temp'
TERM = `cygwin'
USERNAME = `gcoakley'
COMMONPROGRAMFILES = `C:\Program Files\Common Files'
WINDIR = `C:\WINNT'
ACE_ROOT = `D:\Dev\ACE+TAO_5.1.12'
OS = `Windows_NT'
NUMBER_OF_PROCESSORS = `1'
USERPROFILE = `C:\Documents and Settings\gcoakley'
!D: = `D:\cygwin\bin'
APPDATA = `C:\Documents and Settings\gcoakley\Application Data'
HOMESHARE = `\\mqnexus\gcoakley'
SHELL = `/bin/sh'
!EXITCODE = `00000000'
LIB = `D:\Program Files\Development\Visual Studio\VC98\mfc\lib;D:\Program Files\Development\Visual Studio\VC98\lib'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
SYSTEMROOT = `C:\WINNT'
CLASSPATH = `D:\PROGRA~1\MQSeries\java\lib\COMIBM~2.JAR;D:\PROGRA~1\MQSeries\java\lib\COMIBM~1.JAR;D:\PROGRA~1\MQSeries\java\lib\COMIBM~3.JAR;D:\PROGRA~1\MQSeries\tools\javaclnt\samples\en_us;.;D:\DB2_SQLLIB\java\db2java.zip;D:\DB2_SQLLIB\java\runtime.zip;D:\DB2_SQLLIB\java\sqlj.zip'
OSTYPE = `cygwin'
CVSROOT = `:pserver:gcoakley@reddwarf:/usr/cvsroot/master'
HOMEDRIVE = `X:'
BTS_WORKSPACE_ROOT = `d:\dev'
HOMEPATH = `\'
COMPUTERNAME = `GCP36W2K'
COMSPEC = `C:\WINNT\system32\cmd.exe'
DB2INSTANCE = `DB2'
TZ = `CST6'
HOSTTYPE = `i686'
IMNINST = `help'
PROCESSOR_LEVEL = `6'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs\Cygnus Solutions
  (default) = (unsupported type)
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `D:/cygwin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/C
  (default) = `c:'
  flags = 0x00000008
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/D
  (default) = `d:'
  flags = 0x00000008
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `D:/cygwin/bin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `D:/cygwin/lib'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

a:  fd           N/A    N/A                    
c:  hd  NTFS    3914Mb  43% CP CS UN PA FC     OpSys
d:  hd  NTFS   15178Mb  77% CP CS UN PA FC     Data
e:  cd  CDFS     639Mb 100%    CS              SOMETIME
m:  net NTFS   58619Mb  85% CP CS UN PA FC     
x:  net NTFS   35079Mb  33% CP CS UN PA FC     
z:  net NTFS   58619Mb  85% CP CS UN PA FC     

D:\cygwin\bin  /usr/bin  system  binmode
D:\cygwin\lib  /usr/lib  system  binmode
D:\cygwin  /        system  binmode
c:    /C       system  textmode
d:    /D       system  textmode

Found: D:\cygwin\bin\bash.exe
Found: D:\cygwin\bin\cat.exe
Found: d:\Util\cat.exe
Warning: D:\cygwin\bin\cat.exe hides d:\Util\cat.exe
Found: D:\cygwin\bin\cpp.exe
Found: D:\cygwin\bin\find.exe
Found: d:\Util\find.exe
Warning: D:\cygwin\bin\find.exe hides d:\Util\find.exe
Found: D:\cygwin\bin\gcc.exe
Found: D:\cygwin\bin\gdb.exe
Found: D:\cygwin\bin\ld.exe
Found: d:\Util\ld.exe
Warning: D:\cygwin\bin\ld.exe hides d:\Util\ld.exe
Found: D:\cygwin\bin\ls.exe
Found: D:\cygwin\bin\make.exe
Found: D:\cygwin\bin\sh.exe
Found: d:\Util\sh.exe
Warning: D:\cygwin\bin\sh.exe hides d:\Util\sh.exe

   56k 2000/12/03 D:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz21.0.dll" v0.0 ts=2000/11/20 17:53
   82k 2001/01/21 D:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
                  "cygform5.dll" v0.0 ts=2001/1/21 14:39
   18k 2000/10/23 D:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2000/10/22 20:26
   17k 2001/01/07 D:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/6 22:34
   14k 2000/10/23 D:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2000/10/23 13:02
   81k 2000/12/05 D:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2000/11/25 19:43
   35k 2000/12/05 D:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2000/11/25 19:43
   45k 2000/10/22 D:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig1.dll" v0.0 ts=2000/10/22 17:06
  119k 2000/10/23 D:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg6b.dll" v0.0 ts=2000/10/22 18:58
   53k 2001/01/21 D:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu5.dll" v0.0 ts=2001/1/21 14:39
  414k 2001/01/21 D:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++5.dll" v0.0 ts=2001/1/21 14:40
  299k 2001/01/21 D:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses5.dll" v0.0 ts=2001/1/21 14:38
   34k 2001/01/21 D:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel5.dll" v0.0 ts=2001/1/21 14:38
  163k 2001/02/03 D:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng2.dll" v0.0 ts=2001/2/3 15:21
  108k 2001/01/07 D:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/6 22:34
  390k 2000/12/05 D:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2000/11/25 19:39
    5k 2000/12/05 D:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2000/12/05 D:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2000/11/25 19:39
  243k 2000/10/23 D:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff3.dll" v0.0 ts=2000/10/22 19:14
  623k 2000/12/05 D:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2000/11/25 19:43
   41k 2000/11/20 D:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-noX4.dll" v0.0 ts=2000/11/19 20:41
   45k 2000/11/20 D:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-X4.dll" v0.0 ts=2000/11/19 20:45
   49k 2001/02/03 D:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2001/2/3 14:35
  615k 2001/01/31 D:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2001/1/31 9:08
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 8
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 34
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Wed Jan 31 10:08:38 EST 2001
        shared id: cygwin1S3

Use -h to see help about each section


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: error in bash's cd command
  2001-03-28 16:09 error in bash's cd command Glen Coakley
@ 2001-03-28 16:28 ` Christopher Faylor
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Faylor @ 2001-03-28 16:28 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

On Wed, Mar 28, 2001 at 06:08:41PM -0600, Glen Coakley wrote:
>
>[administrator@GCP36W2K /]$ cd  "/d/cygwin/usr/local/bin "
>                             ### Why does this work with the space in there?

I've checked in a fix for this.  It will be in the next release.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-03-28 16:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-28 16:09 error in bash's cd command Glen Coakley
2001-03-28 16:28 ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).