我正在使用zsh并尝试创建一个快捷方式stt
,所以我可以在崇高的文本中打开一个文件夹。我目前添加了一个我在网站上找到的别名,但它只打开一个空白的sublime,没有我文件夹中的文件。我不确定我需要添加什么。谢谢。
alias stt="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
来自subl
的文档:
subl --help
Sublime Text 2 Build 2221
Usage: sublime_text [arguments] [files] edit the given files
or: sublime_text [arguments] [directories] open the given directories
Arguments:
--project <project>: Load the given project
--command <command>: Run the given command
-n or --new-window: Open a new window
-a or --add: Add folders to the current window
-w or --wait: Wait for the files to be closed before returning
-b or --background: Don't activate the application
-h or --help: Show help (this message) and exit
-v or --version: Show version and exit
Filenames may be given a :line or :line:column suffix to open at a specific
location.
要使stt
别名打开一个打开当前工作目录的新窗口:
alias stt='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n -a .'