mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-29 09:10:07 +00:00
Adds Cygwin support
This commit is contained in:
parent
76a26a2a59
commit
07f08aa731
1 changed files with 14 additions and 3 deletions
|
@ -1,5 +1,3 @@
|
||||||
# Sublime Text 2 Aliases
|
|
||||||
|
|
||||||
if [[ $('uname') == 'Linux' ]]; then
|
if [[ $('uname') == 'Linux' ]]; then
|
||||||
local _sublime_linux_paths > /dev/null 2>&1
|
local _sublime_linux_paths > /dev/null 2>&1
|
||||||
_sublime_linux_paths=(
|
_sublime_linux_paths=(
|
||||||
|
@ -33,7 +31,6 @@ elif [[ "$OSTYPE" = darwin* ]]; then
|
||||||
"$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
|
"$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
|
||||||
"$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
|
"$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
|
||||||
)
|
)
|
||||||
|
|
||||||
for _sublime_path in $_sublime_darwin_paths; do
|
for _sublime_path in $_sublime_darwin_paths; do
|
||||||
if [[ -a $_sublime_path ]]; then
|
if [[ -a $_sublime_path ]]; then
|
||||||
subl () { "$_sublime_path" $* }
|
subl () { "$_sublime_path" $* }
|
||||||
|
@ -43,4 +40,18 @@ elif [[ "$OSTYPE" = darwin* ]]; then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
elif [[ "$OSTYPE" = 'cygwin' ]]; then
|
||||||
|
local _sublime_cygwin_paths > /dev/null 2>&1
|
||||||
|
_sublime_cygwin_paths=(
|
||||||
|
"$(cygpath $ProgramW6432/Sublime\ Text\ 2)/sublime_text.exe"
|
||||||
|
"$(cygpath $ProgramW6432/Sublime\ Text\ 3)/sublime_text.exe"
|
||||||
|
)
|
||||||
|
for _sublime_path in $_sublime_cygwin_paths; do
|
||||||
|
if [[ -a $_sublime_path ]]; then
|
||||||
|
subl () { "$_sublime_path" $* }
|
||||||
|
alias st=subl
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
alias stt='st .'
|
alias stt='st .'
|
||||||
|
|
Loading…
Reference in a new issue