Skip to content

Instantly share code, notes, and snippets.

@quangnd
Forked from alber70g/README.md
Created March 6, 2017 10:01
Show Gist options
  • Save quangnd/324cfab510fc6ba989ac7ca6870f5ba1 to your computer and use it in GitHub Desktop.
Save quangnd/324cfab510fc6ba989ac7ca6870f5ba1 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment