diff --git a/install b/install index 5b99ad9..3d69206 100755 --- a/install +++ b/install @@ -55,13 +55,25 @@ if [ "$(uname)" == "Darwin" ]; then brew upgrade ${pkg} 1>/dev/null 2>&1 else echo "Installing $pkg..." - brew install $pkg + brew install ${pkg} fi done LOCAL_PREFIX=$(brew --prefix) git config --system credential.helper osxkeychain + + for app in atom visual-studio-code sublime-text textmate; do + if brew cask list -1 | grep -q "^${app}\$"; then + echo "Upgrading $app..." + brew cask update ${app} + else + echo "Installing $app..." + brew cask install ${app} + fi + done + + git config --system core.editor "atom --wait" fi git config --system color.ui true diff --git a/src/scripts/Darwin/launch-editors.sh b/src/scripts/Darwin/launch-editors.sh index bddda34..71c8fc3 100644 --- a/src/scripts/Darwin/launch-editors.sh +++ b/src/scripts/Darwin/launch-editors.sh @@ -6,34 +6,6 @@ function launch-code() { fi } -function launch-sublime() { - if test -f /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl; then - /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl $* - else - echo "SublimeText is not installed... please install it from http://sublimetext.com" - fi -} - -function launch-atom() { - if test -f /Applications/Atom.app/Contents/Resources/app/atom.sh; then - /Applications/Atom.app/Contents/Resources/app/atom.sh $* - else - echo "Atom is not installed... please install it from http://atom.io" - fi -} - -function atom() { - launch-atom $@ -} - function code() { launch-code $@ -} - -function sublime() { - launch-sublime $@ -} - -function subl() { - launch-sublime $@ } \ No newline at end of file diff --git a/src/scripts/set-prompt.sh b/src/scripts/set-prompt.sh index 9be7e1f..ecd086f 100644 --- a/src/scripts/set-prompt.sh +++ b/src/scripts/set-prompt.sh @@ -29,10 +29,18 @@ for f in $LOCAL_PREFIX/etc/bash_completion.d/*; do source $f done -if type gulp; then +if type gulp 1>/dev/null 2>&1; then eval "$(gulp --completion=bash)" fi +if type grunt 1>/dev/null 2>&1; then + eval "$(grunt --completion=bash)" +fi + +if type npm 1>/dev/null 2>&1; then + eval "$(npm completion)" +fi + function set-prompt() { # set the window title echo -ne "\033]0;${USER}@${HOSTNAME%%.*} ${PWD}\007"