[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
user/981: argument of cd need quote
>Number: 981
>Category: user
>Synopsis: cd to some special directories will fail.
>Confidential: yes
>Severity: non-critical
>Priority: medium
>Responsible: bugs
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 18 02:20:04 MST 1999
>Last-Modified:
>Originator: SUZUKI Hitoshi
>Organization:
sigh@net.nagasaki-u.ac.jp
Faculty of Economics, Nagasaki Univ.
>Release: OpenBSD-current
>Environment:
System : OpenBSD 2.6
Architecture: OpenBSD.i386
Machine : i386
>Description:
ksh has builin cd command which allows
"cd [-LP] old new". So, after loading /etc/ksh.kshrc.
_cd() { "cd" $*; } will cause "cd aaa\ bbb" fail.
>How-To-Repeat:
ksh
. /etc/ksh.kshrc
cd /tmp; mkdir program\ files;cd program\ files
ksh: cd: bad substitution
>Fix:
--- ksh.kshrc.orig Thu Nov 18 17:36:25 1999
+++ ksh.kshrc Thu Nov 18 17:56:02 1999
@@ -60,7 +60,7 @@
alias ls='ls -CF'
alias h='fc -l | more'
- _cd() { "cd" $*; }
+ _cd() { "cd" "$*"; }
# the PD ksh is not 100% compatible
case "$KSH_VERSION" in
*PD*) # PD ksh
>Audit-Trail:
>Unformatted: