aboutsummaryrefslogtreecommitdiff
path: root/src/interp/i-syscmd.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/i-syscmd.boot')
-rw-r--r--src/interp/i-syscmd.boot15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index d829e2aa..df0e8312 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -239,6 +239,21 @@ listConstructorAbbreviations() ==
whatSpad2Cmd '(packages)
sayKeyedMsg("S2IZ0057",NIL)
+--% )cd
+
+cd args ==
+ dir := TRUENAME STRING(car args or '"")
+)if %hasFeature KEYWORD::SBCL
+ SB_-POSIX::CHDIR NAMESTRING dir
+)elseif %hasFeature KEYWORD::GCL
+ SYSTEM::CHDIR NAMESTRING dir
+)else
+ internalError '"don't know how to chdir in this Lisp"
+)endif
+ SETF(_*DEFAULT_-PATHNAME_-DEFAULTS_*, ensureTrailingSlash NAMESTRING dir)
+ sayKeyedMsg("S2IZ0070", [NAMESTRING _*DEFAULT_-PATHNAME_-DEFAULTS_*])
+
+
--% )clear
clear l == clearSpad2Cmd l