From e7d035a0e06ee5a4da158cab9c75a36674e8358b Mon Sep 17 00:00:00 2001 From: Sebastian Semmler <sebastian@semmler.pro> Date: Sun, 19 Jun 2016 18:28:08 +0200 Subject: [PATCH] Revert "Revert "added Visual Studio Code Support to zsh"" This reverts commit 2de9f45c51a8cbff755478e8b65737a81a1ba06d. --- .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