Skip to content

Instantly share code, notes, and snippets.

@alber70g
Last active March 6, 2017 10:01
Show Gist options
  • Save alber70g/98a6506be1707a7962c2 to your computer and use it in GitHub Desktop.
Save alber70g/98a6506be1707a7962c2 to your computer and use it in GitHub Desktop.
Visual Studio Code (VS Code) shell script for use with Git Bash

VS Code Shell Shortcut for Git Bash

Put this file code in C:\Users\<username>\AppData\Local\Code\bin aside code.cmd.

Assuming this path is already in your %PATH% you can now run the command to open a file

code file.txt

Or open the current directory

code .

Meta: Open VS Code with Git Bash Open Visual Studio Code in Git Bash Open Visual Studio Code from Cygwin

#!/bin/bash
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
$DIR/../Update.exe --processStart Code.exe -a$1
@kuncevic
Copy link

kuncevic commented Feb 1, 2016

seams to be not working with the latest versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment