1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-11 00:10:08 +00:00
ohmyzsh/plugins/sublime
Paul Melnikow 4c409b0de9 sublime: Make subl a function so it can be called from functions in other modules
Without this change, whether a function can invoke 'subl' depends on the order in which modules are loaded. With this change, the order doesn't matter.

zsh resolves aliases at parse time not run time, which means if you invoke an alias from a function, the alias must be defined before the function.

See http://stackoverflow.com/a/25532276/893113 which refers to an explanation of this limitation.

For code which may be used non-interactively, the recommend workaround is to use functions instead of aliases.
2015-06-11 21:10:34 +02:00
..
README.md Added missing 'stt' command alias 2015-02-24 21:05:58 +08:00
sublime.plugin.zsh sublime: Make subl a function so it can be called from functions in other modules 2015-06-11 21:10:34 +02:00

sublime

Plugin for Sublime Text, a cross platform text and code editor, available for Linux, Mac OS X, and Windows.

Requirements

Usage

  • If st command is called without an argument, launch Sublime Text

  • If st is passed a directory, cd to it and open it in Sublime Text

  • If st is passed a file, open it in Sublime Text

  • if stt command is called, it is equivalent to st ., opening the current folder in Sublime Text