mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
feat(sublime-merge): add windows path for sublime merge
This commit is contained in:
parent
eb00b95d26
commit
8209567b3c
1 changed files with 14 additions and 8 deletions
|
@ -4,15 +4,21 @@
|
||||||
|
|
||||||
if [[ "$OSTYPE" == linux* ]]; then
|
if [[ "$OSTYPE" == linux* ]]; then
|
||||||
local _sublime_linux_paths
|
local _sublime_linux_paths
|
||||||
_sublime_linux_paths=(
|
if [[ "$(uname -r)" = *icrosoft* ]]; then
|
||||||
"$HOME/bin/sublime_merge"
|
_sublime_linux_paths=(
|
||||||
"/opt/sublime_merge/sublime_merge"
|
"$(wslpath -u 'C:\Program Files\Sublime Merge\sublime_merge.exe' 2>/dev/null)"
|
||||||
"/usr/bin/sublime_merge"
|
|
||||||
"/usr/local/bin/sublime_merge"
|
|
||||||
"/usr/bin/sublime_merge"
|
|
||||||
"/usr/local/bin/smerge"
|
|
||||||
"/usr/bin/smerge"
|
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
_sublime_linux_paths=(
|
||||||
|
"$HOME/bin/sublime_merge"
|
||||||
|
"/opt/sublime_merge/sublime_merge"
|
||||||
|
"/usr/bin/sublime_merge"
|
||||||
|
"/usr/local/bin/sublime_merge"
|
||||||
|
"/usr/bin/sublime_merge"
|
||||||
|
"/usr/local/bin/smerge"
|
||||||
|
"/usr/bin/smerge"
|
||||||
|
)
|
||||||
|
fi
|
||||||
for _sublime_merge_path in $_sublime_linux_paths; do
|
for _sublime_merge_path in $_sublime_linux_paths; do
|
||||||
if [[ -a $_sublime_merge_path ]]; then
|
if [[ -a $_sublime_merge_path ]]; then
|
||||||
sm_run() { $_sublime_merge_path "$@" >/dev/null 2>&1 &| }
|
sm_run() { $_sublime_merge_path "$@" >/dev/null 2>&1 &| }
|
||||||
|
|
Loading…
Reference in a new issue