我最近购买了新的MacBook,并且尝试重新配置系统。
该应用程序位于“应用程序”文件夹中,为“ Sublime Text.app”
我已经通过其他在线建议将Sublime.plugin.zsh文件编辑为“ Sublime Text 3.app”和“ Sublime Text.app”,但都没有运气:
elif [[ $('uname') == 'Darwin' ]]; then
local _sublime_darwin_paths > /dev/null 2>&1
_sublime_darwin_paths=(
"/usr/local/bin/subl"
"/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
"/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
"/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
"$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
"$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
"$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
)
for _sublime_path in $_sublime_darwin_paths; do
if [[ -a $_sublime_path ]]; then
alias subl="'$_sublime_path'"
alias st=subl
break
fi
done
fi
alias stt='st .'
我仍然得到
zsh: command not found: st
我对下一步去很茫然
首先,尝试首先通过zsh手动(交互)启动sublime二进制文件。
为此,您必须发现此二进制文件在哪里。这里有两个实用的选项,选择您最适合的选项:
稍微修改你的脚本echo
你里面的东西if
:
if [[ -a $_sublime_path ]]; then
echo "Sublime found: $_sublime_path"
alias subl="'$_sublime_path'"
alias st=subl
break
fi
找到正确的st
别名后,在.zshrc
文件中创建别名:
alias st="/correct/path/to/subl"
如果您在第一步中没有找到任何东西,那么您的原始脚本确实不起作用。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句