-
-
Save kessler/fc194f8581a6f4ac3f16 to your computer and use it in GitHub Desktop.
launch sublime text from terminal with current directory or with argument
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sub="/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" | |
target=$1 | |
if [[ -z $target ]] | |
then | |
target=$(pwd) | |
fi | |
"$sub" "$target" |
@echo off
SET target=%1
if '%target%' equ '' (
set target=%cd%
)
start "" /b "C:\Program Files\Sublime Text 3\sublime_text.exe" %target%
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SET target=%1
if '%target%' equ '' (
set target=%cd%
)
"c:\program files\sublime text 2\sublime_text.exe" %target%