From 7ff77120c17b83ca1c5d4939d21c1a84a4b2ffbb Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Wed, 29 Jan 2020 16:21:40 +0330 Subject: vscode: use insiders build if stable not found (#8568) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🔨 Add calling VS Code Insiders * ✏️ Update README.md --- plugins/vscode/vscode.plugin.zsh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'plugins/vscode/vscode.plugin.zsh') diff --git a/plugins/vscode/vscode.plugin.zsh b/plugins/vscode/vscode.plugin.zsh index 4c15df2b0..0144e0baa 100644 --- a/plugins/vscode/vscode.plugin.zsh +++ b/plugins/vscode/vscode.plugin.zsh @@ -1,9 +1,17 @@ # VScode zsh plugin -# author: https://github.com/MarsiBarsi +# Authors: +# https://github.com/MarsiBarsi (original author) +# https://github.com/babakks -# Use main Visual Studio Code version by default -: ${VSCODE:=code} +# Use the stable VS Code release, unless the Insiders version is the only +# available installation +if ! which code > /dev/null && which code-insiders > /dev/null; then + : ${VSCODE:=code-insiders} +else + : ${VSCODE:=code} +fi +# Define aliases alias vsc="$VSCODE ." alias vsca="$VSCODE --add" alias vscd="$VSCODE --diff" -- cgit v1.2.3-70-g09d2