Diff
1diff --git a/plugins/bbedit/README.md b/plugins/bbedit/README.md
2new file mode 100644
3index 0000000000000000000000000000000000000000..ec2b743d6a29bebc1bb5bec6d195ed90d0f74ccf
4--- /dev/null
5+++ b/plugins/bbedit/README.md
6@@ -0,0 +1,20 @@
7+## bbedit
8+
9+Plugin for BBEdit, an HTML and text editor for Mac OS X
10+
11+### Requirements
12+
13+ * [BBEdit](http://www.barebones.com/products/bbedit/)
14+ * [BBEdit Command-Line Tools](http://www.barebones.com/support/bbedit/cmd-line-tools.html)
15+
16+### Usage
17+
18+ * If the `bb` command is called without an argument, launch BBEdit
19+
20+ * If `bb` is passed a directory, cd to it and open it in BBEdit
21+
22+ * If `bb` is passed a file, open it in BBEdit
23+
24+ * If `bbpb` create a new BBEdit document with the contents of the clipboard
25+
26+ * If `bbd` alias for BBEdit diff tool
27diff --git a/plugins/bbedit/bbedit.plugin.zsh b/plugins/bbedit/bbedit.plugin.zsh
28new file mode 100644
29index 0000000000000000000000000000000000000000..fe9e72c6567946c00ee172d188574873f9c5014d
30--- /dev/null
31+++ b/plugins/bbedit/bbedit.plugin.zsh
32@@ -0,0 +1,21 @@
33+alias bbpb='pbpaste | bbedit --clean --view-top'
34+
35+alias bbd=bbdiff
36+
37+#
38+# If the bb command is called without an argument, launch BBEdit
39+# If bb is passed a directory, cd to it and open it in BBEdit
40+# If bb is passed a file, open it in BBEdit
41+#
42+function bb() {
43+ if [[ -z "$1" ]]
44+ then
45+ bbedit --launch
46+ else
47+ bbedit "$1"
48+ if [[ -d "$1" ]]
49+ then
50+ cd "$1"
51+ fi
52+ fi
53+}