Cd

angerangel edited this page Jan 2, 2013 · 1 revision
Clone this wiki locally

Table of Contents

USAGE

  CD 'path

DESCRIPTION

Change directory (shell shortcut function). CD is a function value.

ARGUMENTS

  • path -- Accepts %file, :variables and just words (as dirs) (file! word! path! unset! string!)

SOURCE

cd: make function! [  [
    "Change directory (shell shortcut function)."
    'path [file! word! path! unset! string!] "Accepts %file, :variables and just words (as dirs)"
][
    switch type?/word :path [
        unset! [print what-dir]
        file! [change-dir path]
        string! [change-dir to-rebol-file path]
        word! path! [change-dir to-file path]
    ]
] ]