Subject: misc/4307: root .cshrc has broken aliases
To: None <gnats-bugs@gnats.netbsd.org>
From: Charlie Root <root@realms.isdn.uiuc.edu>
List: netbsd-bugs
Date: 10/20/1997 16:41:31
>Number:         4307
>Category:       misc
>Synopsis:       The aliases for cd and back are broken for some directories
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 20 14:50:01 1997
>Last-Modified:
>Originator:     Eric Haszlakiewicz
>Organization:
>Release:        NetBSD-current
>Environment:
	
System: NetBSD realms.isdn.uiuc.edu 1.2G NetBSD 1.2G (REALMS) #3: Sun Oct 19 22:23:47 CDT 1997 root@realms.isdn.uiuc.edu:/usr/src/sys/arch/i386/compile/REALMS i386


>Description:
	The cd and back aliases fail when used with directories that
have spaces in them.
>How-To-Repeat:
	mkdir "a a"
	cd "a a"
	cd ..
	back
/tmp/a: No such file or directory.
>Fix:
*** dot.cshrc.old       Mon Oct 20 16:35:29 1997
--- dot.cshrc   Mon Oct 20 16:35:58 1997
***************
*** 14,21 ****
  alias x       exit
  alias z       suspend
  
! alias back    'set back=$old; set old=$cwd; cd $back; unset back; dirs'
! alias cd      'set old=$cwd; chdir \!*'
  alias pd      pushd
  alias pd2     pushd +2
  alias pd3     pushd +3
--- 14,21 ----
  alias x       exit
  alias z       suspend
  
! alias back    'set back="$old"; set old="$cwd"; cd "$back"; unset back; dirs'
! alias cd      'set old="$cwd"; chdir \!*'
  alias pd      pushd
  alias pd2     pushd +2
  alias pd3     pushd +3

>Audit-Trail:
>Unformatted: