diff options
author | Robby Russell <robby@planetargon.com> | 2014-08-31 11:32:21 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2014-08-31 11:32:21 -0700 |
commit | 69088270357ab203cfafa23a87ee7a177a6bbd2f (patch) | |
tree | ad47c9df047d3eb3b51306b19efd00a33b9c13a4 /plugins/bbedit | |
parent | 671bd0cf4f0face60883a2b476e75e6364d0154e (diff) | |
parent | c22658e15d9d4934ddf411c0cb580f6dd3e901c8 (diff) | |
download | zsh-69088270357ab203cfafa23a87ee7a177a6bbd2f.tar.gz zsh-69088270357ab203cfafa23a87ee7a177a6bbd2f.tar.bz2 zsh-69088270357ab203cfafa23a87ee7a177a6bbd2f.zip |
Merge branch 'master' of github.com:robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/bbedit')
-rw-r--r-- | plugins/bbedit/README.md | 20 | ||||
-rw-r--r-- | plugins/bbedit/bbedit.plugin.zsh | 21 |
2 files changed, 41 insertions, 0 deletions
diff --git a/plugins/bbedit/README.md b/plugins/bbedit/README.md new file mode 100644 index 000000000..ec2b743d6 --- /dev/null +++ b/plugins/bbedit/README.md @@ -0,0 +1,20 @@ +## bbedit + +Plugin for BBEdit, an HTML and text editor for Mac OS X + +### Requirements + + * [BBEdit](http://www.barebones.com/products/bbedit/) + * [BBEdit Command-Line Tools](http://www.barebones.com/support/bbedit/cmd-line-tools.html) + +### Usage + + * If the `bb` command is called without an argument, launch BBEdit + + * If `bb` is passed a directory, cd to it and open it in BBEdit + + * If `bb` is passed a file, open it in BBEdit + + * If `bbpb` create a new BBEdit document with the contents of the clipboard + + * If `bbd` alias for BBEdit diff tool diff --git a/plugins/bbedit/bbedit.plugin.zsh b/plugins/bbedit/bbedit.plugin.zsh new file mode 100644 index 000000000..fe9e72c65 --- /dev/null +++ b/plugins/bbedit/bbedit.plugin.zsh @@ -0,0 +1,21 @@ +alias bbpb='pbpaste | bbedit --clean --view-top' + +alias bbd=bbdiff + +# +# If the bb command is called without an argument, launch BBEdit +# If bb is passed a directory, cd to it and open it in BBEdit +# If bb is passed a file, open it in BBEdit +# +function bb() { + if [[ -z "$1" ]] + then + bbedit --launch + else + bbedit "$1" + if [[ -d "$1" ]] + then + cd "$1" + fi + fi +} |