diff --git a/zsh/func/init_rc_darwin b/zsh/func/init_rc_darwin index 889057c..b11e815 100644 --- a/zsh/func/init_rc_darwin +++ b/zsh/func/init_rc_darwin @@ -37,14 +37,6 @@ function finder { open -R "$1" } -function open-xcode { - local selectedXcode=`xcode-select -p` - while [[ ! `basename $selectedXcode` =~ ".app$" ]]; do - selectedXcode=`dirname "$selectedXcode"` - done - open -a "$selectedXcode" $@ -} - alias -s app='open' alias -s xcodeproj='open-xcode' alias -s xcworkspace='open-xcode' diff --git a/zsh/func/open-xcode b/zsh/func/open-xcode new file mode 100644 index 0000000..8d75381 --- /dev/null +++ b/zsh/func/open-xcode @@ -0,0 +1,12 @@ +#!/usr/bin/env zsh +# Eryn Wells + +open-xcode() { + local selectedXcode=`xcode-select -p` + while [[ ! `basename $selectedXcode` =~ ".app$" ]]; do + selectedXcode=`dirname "$selectedXcode"` + done + open -a "$selectedXcode" $@ +} + +open-xcode "$@" diff --git a/zshrc b/zshrc index 3db633f..b628e5d 100644 --- a/zshrc +++ b/zshrc @@ -21,3 +21,4 @@ autoload -Uz nethack autoload -Uz pw autoload -Uz up autoload -Uz vi +autoload -Uz open-xcode