我正在使用 zsh 并尝试创建一个快捷方式stt
,所以我可以用崇高的文本打开一个文件夹。我目前添加了一个在网站上找到的别名,但它只打开一个空白的 sublime,我的文件夹中没有文件。我不确定我需要添加什么。谢谢。
alias stt="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
我正在使用 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 .'