Skip to content

Instantly share code, notes, and snippets.

@smockle
Created June 20, 2014 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smockle/68877e9fbd0ef8271ebb to your computer and use it in GitHub Desktop.
Save smockle/68877e9fbd0ef8271ebb to your computer and use it in GitHub Desktop.
Open files in Brackets via the command line. Usage: `brackets foo.txt` or `brackets ~/foo.txt` or `brackets ./foo.txt`
brackets() {
ifile=''
if [[ $1 == */c/* ]]
then
ifile+=$1
else
ifile+=`echo -n $(pwd)`
ifile+=/$1
fi
echo "$ifile"
/c/Program\ Files\ \(x86\)/Brackets/Brackets.exe "$ifile"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment