[visual-studio-code] How to open Visual Studio Code from the command line on OSX?

We since updated the script to the following syntax to support multiple files and folders as arguments and to fix an issue with not detecting the current working directory properly:

code () {
    VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $*
}

Update for our VS Code 1.0 release:

Please use the command Install 'Code' command in path or Install 'code-insiders' command in path from the command palette (View | Command Palette) to make Code available to the command line.