summary refs log tree commit diff stats
path: root/lib/system/nimscript.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/nimscript.nim')
-rw-r--r--lib/system/nimscript.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/system/nimscript.nim b/lib/system/nimscript.nim
index 5d1916c7f..0b49ea2e7 100644
--- a/lib/system/nimscript.nim
+++ b/lib/system/nimscript.nim
@@ -342,17 +342,17 @@ template withDir*(dir: string; body: untyped): untyped =
   ## Usage example:
   ##
   ## .. code-block:: nim
+  ##   # inside /some/path/
   ##   withDir "foo":
-  ##     # inside foo
-  ##   #back to last dir
-  var curDir = getCurrentDir()
+  ##     # move to /some/path/foo/
+  ##   # back in /some/path/
+  let curDir = getCurrentDir()
   try:
     cd(dir)
     body
   finally:
     cd(curDir)
 
-
 proc writeTask(name, desc: string) =
   if desc.len > 0:
     var spaces = " "