From a26f77230c86471814c9e2f199b4ad303e13d9ee Mon Sep 17 00:00:00 2001
From: Sebastian Semmler <sebastian@semmler.pro>
Date: Sun, 19 Jun 2016 17:11:12 +0200
Subject: [PATCH] added Visual Studio Code Support to zsh

---
 .zshrc | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/.zshrc b/.zshrc
index cc3e0d3..6349822 100644
--- a/.zshrc
+++ b/.zshrc
@@ -8,6 +8,19 @@ for config_file ($ZSH/lib/*.zsh) source $config_file
 autoload -U compinit
 compinit -i
 
+# Visual Studio Code
+function code {  
+    if [[ $# = 0 ]]
+    then
+        open -a "Visual Studio Code"
+    else
+        local argPath="$1"
+        [[ $1 = /* ]] && argPath="$1" || argPath="$PWD/${1#./}"
+        open -a "Visual Studio Code" "$argPath"
+    fi
+}
+
+# Alias
 alias ls='ls -a'
 alias zshconfig="mate ~/.zshrc"
 alias launchpadreset="defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock"
-- 
GitLab