{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/vscode-docs/issues/81","labels_url":"https://api.github.com/repos/Microsoft/vscode-docs/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode-docs/issues/81/comments","events_url":"https://api.github.com/repos/Microsoft/vscode-docs/issues/81/events","html_url":"https://github.com/Microsoft/vscode-docs/issues/81","id":122328356,"number":81,"title":"\"code\" function for OSX Yosemite fails with syntax errors, max number of files for opening","user":{"login":"yangmillstheory","id":2729079,"avatar_url":"https://avatars.githubusercontent.com/u/2729079?v=3","gravatar_id":"","url":"https://api.github.com/users/yangmillstheory","html_url":"https://github.com/yangmillstheory","followers_url":"https://api.github.com/users/yangmillstheory/followers","following_url":"https://api.github.com/users/yangmillstheory/following{/other_user}","gists_url":"https://api.github.com/users/yangmillstheory/gists{/gist_id}","starred_url":"https://api.github.com/users/yangmillstheory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yangmillstheory/subscriptions","organizations_url":"https://api.github.com/users/yangmillstheory/orgs","repos_url":"https://api.github.com/users/yangmillstheory/repos","events_url":"https://api.github.com/users/yangmillstheory/events{/privacy}","received_events_url":"https://api.github.com/users/yangmillstheory/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-15T17:51:31Z","updated_at":"2015-12-30T22:27:06Z","closed_at":"2015-12-30T22:27:06Z","body":"On Yosemite 10.10.5, I followed instructions for setting up `code` in the Mac OS shell [here](https://code.visualstudio.com/docs/editor/setup), but get syntax errors.\r\n\r\n\tts (master?!) $ more ~/.bash_profile\r\n\tif [ -f ~/.bashrc ]; then\r\n\t   source ~/.bashrc\r\n\tfi\r\n\r\n\t# Setting PATH for Python 3.5\r\n\t# The orginal version is saved in .bash_profile.pysave\r\n\tPATH=\"/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}\"\r\n\texport PATH\r\n\r\n\tcode () { VSCODE_CWD=\"$PWD\" open -n -b \"com.microsoft.VSCode\" --args $* ;}\r\n\tts (master?!) $ source ~/.bash_profile\r\n\t-bash: /Users/valvarez/.bash_profile: line 10: syntax error near unexpected token `('\r\n\t-bash: /Users/valvarez/.bash_profile: line 10: `code () { VSCODE_CWD=\"$PWD\" open -n -b \"com.microsoft.VSCode\" --args $* ;}'\r\n\r\nPrefixing the definition with `function` makes it work:\r\n\r\n\t~ $ more ~/.bash_profile\r\n\tif [ -f ~/.bashrc ]; then\r\n\t   source ~/.bashrc\r\n\tfi\r\n\r\n\t# Setting PATH for Python 3.5\r\n\t# The orginal version is saved in .bash_profile.pysave\r\n\tPATH=\"/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}\"\r\n\texport PATH\r\n\r\n\tfunction code () { VSCODE_CWD=\"$PWD\" open -n -b \"com.microsoft.VSCode\" --args $*\r\n\t ;}\r\n\t~ $ source ~/.bash_profile\r\n\t~ $\r\n\r\n`code` now opens new files as well as creates new ones if they don't exist, however, it only opens up a maximum of three files plus an optional directory.\r\n\r\n\tts (master?!) $ ls -l\r\n\ttotal 40\r\n\t-rw-r--r--  1 valvarez  TSI\\Domain Users   91 Dec 14 22:03 app.js\r\n\t-rw-r--r--  1 valvarez  TSI\\Domain Users   92 Dec 14 19:50 app.ts\r\n\t-rw-r--r--  1 valvarez  TSI\\Domain Users    0 Dec 15 09:41 bar\r\n\t-rw-r--r--  1 valvarez  TSI\\Domain Users    0 Dec 15 09:41 baz\r\n\t-rw-r--r--  1 valvarez  TSI\\Domain Users   64 Dec 14 22:03 foo.js\r\n\t-rw-r--r--  1 valvarez  TSI\\Domain Users   54 Dec 14 19:42 foo.ts\r\n\t-rw-r--r--  1 valvarez  TSI\\Domain Users  104 Dec 14 22:03 jsconfig.json\r\n\tts (master?!) $ code bar baz app.ts\r\n\tts (master?!) $\r\n    ts (master?!) $ code ../vs-code foo bar ../vs-code/LICENSE.md\r\n\r\nYou'll have to trust me that these last step opens up a new editor with with the right files :).\r\n\r\nThat maximum limit is not in accordance with this [documentation](https://code.visualstudio.com/docs/editor/codebasics):\r\n\r\n>Sometimes you will want to open or create a file. If a file does not exist, we will create it for you:\r\n\r\n> code index.html style.css readme.md\r\n>Tip: You can have as many file names as you want separated by spaces.\r\n\r\nI can submit a pull request with [the fixed function definition](https://github.com/yangmillstheory/vscode-docs/commit/a299af80ea91bd9edf37f46ad95309f5fb49161f), but should we denote the limit for the number of files `code` can open at once [here](https://code.visualstudio.com/docs/editor/codebasics)?"}}