Skip to content

Commit

Permalink
Update man pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmc3 committed Sep 22, 2023
1 parent 289c134 commit 4a51d92
Show file tree
Hide file tree
Showing 15 changed files with 58 additions and 274 deletions.
6 changes: 3 additions & 3 deletions man/antidote-bundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ header: Antidote Manual
**antidote-bundle** assembles your Zsh plugins. Bundles can be git repos, or local files or dirctories. If a plugin is a repo, it will be cloned if necessary. The zsh code necessary to load (source) the plugin is then printed.

| antidote bundle gituser/gitrepo
| antidote bundle ${ZDOTDIR:-}/.zplugins/myplugin
| antidote bundle ${ZDOTDIR:-~}/.zlibs/myfile.zsh
| antidote bundle $ZSH_CUSTOM/plugins/myplugin
| antidote bundle ${ZDOTDIR:-\$HOME}/.zlibs/myfile.zsh

Bundles also support annotations. Annotations allow you have finer grained control over your plugins. Annotations are used in the form \'keyword:value\'.

Expand Down Expand Up @@ -94,7 +94,7 @@ Using the **conditional:** annotation...

| # define a conditional function prior to loading antidote
| function is_macos {
| [[ $OSTYPE == darwin* ]] && return 0 || return 1
| [[ $OSTYPE == darwin* ]] || return 1
| }
|
| # conditionally load a plugin using the function you made
Expand Down
2 changes: 1 addition & 1 deletion man/antidote-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ header: Antidote Manual
: Bundle to be installed.

[\<bundlefile\>]
: Bundle file to write to if not using the default. Defaults to **${ZDOTDIR:-~}/.zsh_plugins.txt** or zstyle setting.
: Bundle file to write to if not using the default. Defaults to **${ZDOTDIR:-\$HOME}/.zsh_plugins.txt** or zstyle setting.

# EXAMPLES

Expand Down
12 changes: 6 additions & 6 deletions man/antidote-load.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ header: Antidote Manual

**antidote-load** will turn the bundle file into a static load file and then source it.

The default bundle file is **${ZDOTDIR:-~}/.zsh_plugins.txt**. This can be overridden with the following **zstyle**:
The default bundle file is **${ZDOTDIR:-\$HOME}/.zsh_plugins.txt**. This can be overridden with the following **zstyle**:

| bundlefile=~/.zplugins
| zstyle ':antidote:bundle' file $bundlefile
| zstyle \':antidote:bundle\' file $bundlefile

The default static file is **${ZDOTDIR:-~}/.zsh_plugins.zsh**. This can be overridden with the following **zstyle**:
The default static file is **${ZDOTDIR:-\$HOME}/.zsh_plugins.zsh**. This can be overridden with the following **zstyle**:

| staticfile=~/.zplugins.zsh
| zstyle ':antidote:static' file $staticfile
| zstyle \':antidote:static\' file $staticfile

# OPTIONS

-h, \--help
: Show the help documentation.

[\<bundlefile\>]
: The plugins file to source if not using the default. Defaults to **${ZDOTDIR:-~}/.zsh_plugins.txt** or zstyle setting.
: The plugins file to source if not using the default. Defaults to **${ZDOTDIR:-\$HOME}/.zsh_plugins.txt** or zstyle setting.

[\<staticfile\>]
: The static plugins file to generate if not using the default. Defaults to **${ZDOTDIR:-~}/.zsh_plugins.zsh** or zstyle setting.
: The static plugins file to generate if not using the default. Defaults to **${ZDOTDIR:-\$HOME}/.zsh_plugins.zsh** or zstyle setting.
10 changes: 5 additions & 5 deletions man/antidote.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,22 @@ It is written natively in Zsh, is well tested, and picks up where Antigen and An

Create a _.zsh_plugins.txt_ file with a list of the plugins you want:

| # ${ZDOTDIR:-~}/.zsh_plugins.txt
| # ${ZDOTDIR:-\$HOME}/.zsh_plugins.txt
| zsh-users/zsh-syntax-highlighting
| zsh-users/zsh-history-substring-search
| zsh-users/zsh-autosuggestions

Now, simply load your newly created static plugins file in your _.zshrc_.

| # ${ZDOTDIR:-~}/.zshrc
| # ${ZDOTDIR:-\$HOME}/.zshrc
| source /path/to/antidote/antidote.zsh
| antidote load

## A More Advanced Config

Your _.zsh_plugins.txt_ file supports annotations. Annotations tell antidote how to do things like load plugins from alternate paths. This lets you use plugins from popular frameworks like Oh-My-Zsh:

| # ${ZDOTDIR:-~}/.zsh_plugins.txt
| # ${ZDOTDIR:-\$HOME}/.zsh_plugins.txt
| ohmyzsh/ohmyzsh path:lib
| ohmyzsh/ohmyzsh path:plugins/git
| ohmyzsh/ohmyzsh path:plugins/magic-enter
Expand Down Expand Up @@ -114,11 +114,11 @@ Instead of calling **antidote bundle** over and over, you might prefer to load b

To install antidote you can clone it with git:

| git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote
| git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-\$HOME}/.antidote

Then, simply add the following snippet to your .zshrc:

| source ${ZDOTDIR:-~}/.antidote/antidote.zsh
| source ${ZDOTDIR:-\$HOME}/.antidote/antidote.zsh
| antidote load

# SEE ALSO
Expand Down
42 changes: 11 additions & 31 deletions man/man1/antidote-bundle.1
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
.\" Automatically generated by Pandoc 3.1.4
.\" Automatically generated by Pandoc 3.1.7
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "antidote-bundle" "1" "" "" "Antidote Manual"
.hy
.SH NAME
.PP
\f[B]antidote bundle\f[R] - download a bundle and print its source line
.SH SYNOPSIS
.PP
antidote bundle [<bundles>\&...]
.SH DESCRIPTION
.PP
\f[B]antidote-bundle\f[R] assembles your Zsh plugins.
Bundles can be git repos, or local files or dirctories.
If a plugin is a repo, it will be cloned if necessary.
Expand All @@ -33,17 +16,17 @@ The zsh code necessary to load (source) the plugin is then printed.
.PD 0
.P
.PD
\ \ antidote bundle ${ZDOTDIR:-}/.zplugins/myplugin
\ \ antidote bundle $ZSH_CUSTOM/plugins/myplugin
.PD 0
.P
.PD
\ \ antidote bundle ${ZDOTDIR:-\[ti]}/.zlibs/myfile.zsh
\ \ antidote bundle ${ZDOTDIR:-$HOME}/.zlibs/myfile.zsh
.PP
Bundles also support annotations.
Annotations allow you have finer grained control over your plugins.
Annotations are used in the form \[aq]keyword:value\[aq].
.TP
\f[V]kind\f[R]
\f[CR]kind\f[R]
.IP \[bu] 2
\f[B]zsh\f[R]: A zsh plugin.
This is the default kind of bundle.
Expand All @@ -61,29 +44,29 @@ with it.
\f[B]autoload\f[R]: Autoload all the files in the plugin directory as
zsh functions.
.TP
\f[V]branch\f[R]
\f[CR]branch\f[R]
The branch annotation allows you to change the default branch of a
plugin\[cq]s repo from \f[B]main\f[R] to a branch of your choosing.
.TP
\f[V]path\f[R]
\f[CR]path\f[R]
The path annotation allows you to use a subdirectory or file within a
plugin\[cq]s structure instead of the root plugin (eg:
\[aq]path:plugins/subplugin\[aq]).
.TP
\f[V]conditional\f[R]
\f[CR]conditional\f[R]
The conditonal annotation allows you to wrap an \f[B]if\f[R] statement
around a plugin\[cq]s load script.
Supply the name of a zero argument zsh function to conditional to
perform the test (eg: \[aq]conditional:is-macos\[aq]).
.TP
\f[V]pre\f[R] / \f[V]post\f[R]
\f[CR]pre\f[R] / \f[CR]post\f[R]
The pre and post annotations allow you to call a function befor or after
a plugin\[cq]s load script.
This is helpful when configuring plugins, since the configuration
functions will only run for active plugins.
Supply the name of a zero argument zsh function to pre or post.
.TP
\f[V]autoload\f[R]
\f[CR]autoload\f[R]
The autoload annotation allows you to autoload a zsh functions directory
in addition to however the plugin was loaded as specified by
\[aq]kind\[aq].
Expand All @@ -92,7 +75,7 @@ Supply a relative path to autoload (eg: \[aq]autoload:functions\[aq]).
Cloned repo directory names can be overridden with the following
\f[B]zstyle\f[R]:
.PP
\ \ zstyle \[aq]:antidote:bundle\[aq] use-friendly-names \[aq]yes\[aq]
\ \ zstyle `:antidote:bundle' use-friendly-names `yes'
.SH OPTIONS
.TP
-h, --help
Expand All @@ -101,7 +84,6 @@ Show the help documentation.
[\f[I]<bundles>\&...\f[R]]
Zsh plugin bundles
.SH EXAMPLES
.PP
Using the \f[B]kind:\f[R] annotation\&...
.PP
\ \ # a regular plugin (kind:zsh is implied, so it\[cq]s unnecessary)
Expand Down Expand Up @@ -171,7 +153,7 @@ Using the \f[B]conditional:\f[R] annotation\&...
.PD 0
.P
.PD
\ \ \ \ [[ $OSTYPE == darwin* ]] && return 0 || return 1
\ \ \ \ [[ $OSTYPE == darwin* ]] || return 1
.PD 0
.P
.PD
Expand All @@ -189,7 +171,6 @@ Using the \f[B]conditional:\f[R] annotation\&...
\ \ antidote bundle ohmyzsh/ohmyzsh path:plugins/macos
conditional:is_macos
.SH BUGS
.PP
See GitHub Issues: <https://github.com/mattmc3/antidote/issues>
.SH AUTHORS
.IP \[bu] 2
Expand All @@ -198,5 +179,4 @@ Copyright (c) 2021-2023 Matt McElheny
antidote contributers:
<https://github.com/mattmc3/antidote/graphs/contributors>
.SH LICENSE
.PP
MIT
21 changes: 1 addition & 20 deletions man/man1/antidote-help.1
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
.\" Automatically generated by Pandoc 3.1.4
.\" Automatically generated by Pandoc 3.1.7
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "antidote-help" "1" "" "" "Antidote Manual"
.hy
.SH NAME
.PP
\f[B]antidote help\f[R] - show antidote documentation
.SH SYNOPSIS
.PP
antidote help [<command>]
.SH DESCRIPTION
.PP
\f[B]antidote-help\f[R] is used to show context-sensitive help for
antidote and its commands.
.SH OPTIONS
Expand All @@ -34,7 +17,6 @@ Inception-style meta-help recursively.
[\f[I]<command>\f[R]]
Show help for a specific command.
.SH BUGS
.PP
See GitHub Issues: <https://github.com/mattmc3/antidote/issues>
.SH AUTHORS
.IP \[bu] 2
Expand All @@ -43,5 +25,4 @@ Copyright (c) 2021-2023 Matt McElheny
antidote contributers:
<https://github.com/mattmc3/antidote/graphs/contributors>
.SH LICENSE
.PP
MIT
22 changes: 1 addition & 21 deletions man/man1/antidote-home.1
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
.\" Automatically generated by Pandoc 3.1.4
.\" Automatically generated by Pandoc 3.1.7
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "antidote-home" "1" "" "" "Antidote Manual"
.hy
.SH NAME
.PP
\f[B]antidote home\f[R] - print where antidote is cloning bundles
.SH SYNOPSIS
.PP
antidote home
.SH DESCRIPTION
.PP
\f[B]antidote-home\f[R] shows you where antidote stores its cloned
repos.
It is not the home of the antidote utility itself.
Expand All @@ -37,12 +20,10 @@ You can override antidote\[cq]s default home directory by setting the
-h, --help
Show the help documentation.
.SH EXAMPLES
.PP
You can clear out all your cloned repos like so:
.PP
\ \ rm -rfi $(antidote home)
.SH BUGS
.PP
See GitHub Issues: <https://github.com/mattmc3/antidote/issues>
.SH AUTHORS
.IP \[bu] 2
Expand All @@ -51,5 +32,4 @@ Copyright (c) 2021-2023 Matt McElheny
antidote contributers:
<https://github.com/mattmc3/antidote/graphs/contributors>
.SH LICENSE
.PP
MIT
21 changes: 1 addition & 20 deletions man/man1/antidote-init.1
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
.\" Automatically generated by Pandoc 3.1.4
.\" Automatically generated by Pandoc 3.1.7
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "antidote-init" "1" "" "" "Antidote Manual"
.hy
.SH NAME
.PP
\f[B]antidote init\f[R] - initialize the shell for dynamic bundles
.SH SYNOPSIS
.PP
source <(antidote init)
.SH DESCRIPTION
.PP
\f[B]antidote-init\f[R] changes how the \f[B]antidote\f[R] command works
by causing \f[B]antidote bundle\f[R] to automatically source its own
output instead of just generating the Zsh script for a static file.
Expand All @@ -43,7 +26,6 @@ before using \f[B]antidote bundle\f[R] commands:
-h, --help
Show the help documentation.
.SH BUGS
.PP
See GitHub Issues: <https://github.com/mattmc3/antidote/issues>
.SH AUTHORS
.IP \[bu] 2
Expand All @@ -52,5 +34,4 @@ Copyright (c) 2021-2023 Matt McElheny
antidote contributers:
<https://github.com/mattmc3/antidote/graphs/contributors>
.SH LICENSE
.PP
MIT
Loading

0 comments on commit 4a51d92

Please sign in to comment.