## File: README.md

# Prezto — Instantly Awesome Zsh

Prezto is the configuration framework for [Zsh][1]; it enriches the command line
interface environment with sane defaults, aliases, functions, auto completion,
and prompt themes.

## Installation

### Manual

Prezto will work with any recent release of Zsh, but the minimum required
version is **4.3.11**.

01. Launch Zsh:

    ```console
    zsh
    ```

02. Clone the repository:

    ```console
    git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
    ```

    
      *Optional: Installing in `$XDG_CONFIG_HOME`*

      Optionally, if you already have `$XDG_CONFIG_HOME` configured (usually as
      _`$HOME/.config`_ by default) and intend to install Prezto under
      _`$XDG_CONFIG_HOME/zsh`_ instead, you can clone the repository there and
      configure `$ZDOTDIR` separately if not already configured.

      - Clone the repository:

        ```console
        git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-${XDG_CONFIG_HOME:-$HOME/.config}/zsh}/.zprezto"
        ```

      - Configure `$XDG_CONFIG_HOME` and `$ZDOTDIR` in _`$HOME/.zshenv`_:

        ```sh
        export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}"
        [[ -d $XDG_CONFIG_HOME/zsh ]] && export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
        source "$ZDOTDIR/.zshenv"
        ```

    

03. Create a new Zsh configuration by copying/linking the Zsh configuration
    files provided:

    ```console
    setopt EXTENDED_GLOB
    for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
      ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
    done
    ```

    **Note:** If you already have any of the given configuration files, `ln` in
    the above operation will cause an error. In simple cases, you can load
    Prezto by adding the line `source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"` to
    the bottom of your _`${ZDOTDIR:-$HOME}/.zshrc`_ and keep the rest of your
    Zsh configuration intact. For more complicated setups, we recommend that you
    back up your original configs and replace them with the provided Prezto
    [_`runcoms`_][10].

04. Set Zsh as your default shell:

    ```console
    chsh -s /bin/zsh
    ```

05. Open a new Zsh terminal window or tab.

### Troubleshooting

If you are not able to find certain commands after switching to Prezto, modify
the `PATH` variable in _`${ZDOTDIR:-$HOME}/.zprofile`_ then open a new Zsh
terminal window or tab.

## Updating

Run `zprezto-update` to automatically check if there is an update to Prezto.
If there are no file conflicts, Prezto and its submodules will be automatically
updated. If there are conflicts you will be instructed to go into the
`$ZPREZTODIR` directory and resolve them yourself.

To pull the latest changes and update submodules manually:

```console
cd $ZPREZTODIR
git pull
git submodule sync --recursive
git submodule update --init --recursive
```

## Usage

Prezto has many features disabled by default. Read the source code and the
accompanying README files to learn about what is available.

### Modules

01. Browse [_`modules`_][9] to see what is available.
02. Load the modules you need in _`${ZDOTDIR:-$HOME}/.zpreztorc`_ and then open
    a new Zsh terminal window or tab.

### Themes

01. For a list of themes, type `prompt -l`.
02. To preview a theme, type `prompt -p name`.
03. Load the theme you like in _`${ZDOTDIR:-$HOME}/.zpreztorc`_ and then
    open a new Zsh terminal window or tab.

    ![sorin theme][2]
    Note that the [_`git`_][11] module may be required for special symbols to
    appear, such as those on the right of the above image. Add `'git'` to the
    `pmodule` list (under `zstyle ':prezto:load' pmodule \` in your
    _`${ZDOTDIR:-$HOME}/.zpreztorc`_) to enable this module.

### External Modules

01. By default modules will be loaded from [_`/modules`_][9] and _`/contrib`_.
02. Additional module directories can be added to the
    `:prezto:load:pmodule-dirs` setting in _`${ZDOTDIR:-$HOME}/.zpreztorc`_.

    Note that module names need to be unique or they will cause an error when
    loading.

    ```sh
    zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib
    ```

## Customization

The project is managed via [Git][3]. We highly recommend that you fork this
project so that you can commit your changes and push them to your fork on
[GitHub][4] to preserve them. If you do not know how to use Git, follow this
[tutorial][5] and bookmark this [reference][6].

## Resources

The [Zsh Reference Card][7] and the [zsh-lovers][8] man page are indispensable.

## License

This project is licensed under the MIT License.

[1]: https://www.zsh.org
[2]: https://i.imgur.com/nrGV6pg.png "sorin theme"
[3]: https://git-scm.com
[4]: https://github.com
[5]: https://gitimmersion.com
[6]: https://git.github.io/git-reference/
[7]: http://www.bash2zsh.com/zsh_refcard/refcard.pdf
[8]: https://grml.org/zsh/zsh-lovers.html
[9]: modules#readme
[10]: runcoms#readme
[11]: modules/git#readme

---

## File: modules/rails/README.md

# Ruby on Rails

Defines [Ruby on Rails][1] aliases.

## Aliases

Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.

```sh
zstyle ':prezto:module:rails:alias' skip 'yes'
```

- `ror` is short for `rails`.
- `rorc` starts the Rails console.
- `rordc` starts the Rails console connected to the database.
- `rordm` migrates the database.
- `rordM` migrates the database and recreates the test database.
- `rordr` rolls the database schema back to the previous version.
- `rorg` generates new code.
- `rorl` displays the log.
- `rorlc` truncates logs to zero bytes.
- `rorp` installs a plugin.
- `rorr` runs code in the application environment.
- `rors` starts the Rails server.
- `rorsd` starts the Rails server with the debugger.
- `rorx` destroys newly generated code.

## Authors

_The authors of this module should be contacted via the [issue tracker][2]._

- [Robby Russell](https://github.com/robbyrussell)
- [Jake Bell](https://github.com/theunraveler)
- [Sorin Ionescu](https://github.com/sorin-ionescu)

[1]: https://rubyonrails.org
[2]: https://github.com/sorin-ionescu/prezto/issues

---

## File: modules/python/README.md

# Python

Enables local Python and local Python package installation.

## Settings

This module supports virtual environments from conda and
[_virtualenvwrapper_][2]. By default, only _virtualenvwrapper_ is enabled. To
disable _virtualenvwrapper_, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.

```sh
zstyle ':prezto:module:python:virtualenv' initialize 'no'
```

Conda support can be enabled by adding the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.

```sh
zstyle ':prezto:module:python' conda-init 'on'
```

Caution: using conda and virtualenvwrapper at the same time may cause conflicts.

## Local Python Installation

[_pyenv_][4] builds and installs multiple Python versions locally in the home
directory.

This module prepends the _pyenv_ directory to the path variable to enable the
execution of `pyenv`.

### Usage

Install Python versions with `pyenv install` into _`~/.pyenv/versions`_.

This will be loaded automatically if pyenv is installed to `$PYENV_ROOT`,
_`~/.pyenv`_, or if the `pyenv` command is on the path. By default, `PYENV_ROOT`
is set to _`$HOME/.pyenv`_. You can set it to an alternate location and export
it in [_`${ZDOTDIR:-$HOME}/.zshenv`_][6].

## Local Package Installation

Since version 2.6, Python supports per user package installation, as defined in
[PEP 370][1].

This module prepends per user site directories to the relevant path variables
to enable the execution of user installed scripts and the reading of
documentation.

### Usage

Install packages into the per user site directory with `pip install --user`.

## virtualenvwrapper

[_virtualenvwrapper_][2] is a frontend to the popular [_virtualenv_][3] utility.

`virtualenv` creates isolated Python environments and `virtualenvwrapper`
provides convenient shell functions to create, switch, and manage them.

### Usage

Install `virtualenvwrapper`.

Virtual environments are stored in _`~/.virtualenvs`_.

There are configuration variables that have to be set to enable certain
features. If you wish to use these features, export the variables in
[_`${ZDOTDIR:-$HOME}/.zshenv`_][6].

The variable `$PROJECT_HOME` tells `virtualenvwrapper` where to place project
working directories. It must be set and the directory created before `mkproject`
is used. Replace _Developer_ with your projects directory.

```sh
export PROJECT_HOME="$HOME/Developer"
```

The variable `VIRTUALENVWRAPPER_PYTHON` tells `virtualenvwrapper` to use the
specified full path of the `python` interpreter overriding the `$PATH` search.

```sh
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python
```

The variable `VIRTUALENVWRAPPER_VIRTUALENV` tells `virtualenvwrapper` to use the
specified full path of `virtualenv` binary overriding the `$PATH` search.

```sh
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
```

The variable `$VIRTUALENVWRAPPER_VIRTUALENV_ARGS` tells `virtualenvwrapper` what
arguments to pass to `virtualenv`. For example, set the value to
`--system-site-packages` to ensure that all new environments have access to the
system site-packages directory.

```sh
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--system-site-packages'
```

### Additional Options

There is a hook to enable auto-switching to virtualenvs when switching into a
directory where the root of the project matches a virtualenv name.

This can be enabled with:

```sh
zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
```

`virtualenvwrapper` is automatically initialized if pre-requisites are met
(`$VIRTUALENVWRAPPER_VIRTUALENV` is explicitly set or `virtualenv` is in
`$PATH`). This can be disabled with:

```sh
zstyle ':prezto:module:python:virtualenv' initialize 'no'
```

## Aliases

Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.

```sh
zstyle ':prezto:module:python:alias' skip 'yes'
```

- `py` is short for `python`.
- `py2` is short for `python2`.
- `py3` is short for `python3`.

## Functions

- `python-info` exposes information about the Python environment via the
  `$python_info` associative array.

## Theming

To display the name of the current virtual environment in a prompt, define the
following style in the `prompt_name_setup` function.

```sh
# %v - virtualenv name.
zstyle ':prezto:module:python:info:virtualenv' format 'virtualenv:%v'
```

Then add `$python_info[virtualenv]` to `$PROMPT` or `$RPROMPT` and call
`python-info` in the `prompt_name_preexec` hook function.

Similarly, you can use `:prezto:module:python:info:version:format` with `%v` for
the version and add `$python_info[version]` to your prompt for the current
python version.

## Authors

_The authors of this module should be contacted via the [issue tracker][5]._

- [Sorin Ionescu](https://github.com/sorin-ionescu)
- [Sebastian Wiesner](https://github.com/lunaryorn)

[1]: https://www.python.org/dev/peps/pep-0370/
[2]: https://www.doughellmann.com/projects/virtualenvwrapper/
[3]: https://pypi.org/project/virtualenv/
[4]: https://github.com/yyuu/pyenv
[5]: https://github.com/sorin-ionescu/prezto/issues
[6]: ../../runcoms#zshenv

---

## File: modules/prompt/README.md

# Prompt

Loads prompt [themes][1].

## Settings

### Prompt Theme

To select a prompt theme, add the following to _`${ZDOTDIR:-$HOME}/.zpreztorc`_,
and replace `'<name>'` with the name of the theme you wish to load. Setting it
to `'random'` will load a random theme every time.

```sh
zstyle ':prezto:module:prompt' theme '<name>'
```

### Prompt Display Length

To change working directory prompt display length from 'short', set the
following to 'long' (without `~` expansion) or 'full' (with `~` expansion) in
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.

```sh
zstyle ':prezto:module:prompt' pwd-length 'short'
```

### Display Return Value

Some prompts display the return value in the prompt. If a prompt has support,
this can be disabled with the following snippet.

```sh
zstyle ':prezto:module:prompt' show-return-val 'no'
```

## Theming

A prompt theme is an autoloadable function file with a special name,
`prompt_name_setup`, placed anywhere in `$fpath`, but for the purpose of this
project, themes **should** be placed in the _modules/prompt/functions_
directory.

### Required Variables

To ensure that your function works with the editor-info module you'll need to
set the following variable in _`${ZDOTDIR:-$HOME}/.zpreztorc`_:

```sh
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
```

This is to ensure compatibility with outside prompts, while allowing prezto
and prezto-compatible prompts to take full advantage of the editor module.
This should be set in the `prompt_name_setup` function after you've added
any additional hooks with `add-zsh-hook precmd prompt_name_precmd`. See below
for additional information about functions and hooks.

### Theme Functions

There are three theme functions, a setup function, a help function, and
a preview function. The setup function **must** always be defined. The help
function and the preview functions are optional.

#### `prompt_name_setup`

This function is called by the `prompt` function to install the theme. This
function may define other functions as necessary to maintain the prompt,
including a function that displays help or a function used to preview it.

**Do not call this function directly.**

The most basic example of this function can be seen below.

```sh
function prompt_name_setup {
  PROMPT='%m%# '
  RPROMPT=''
}
```

#### `prompt_name_help`

If the `prompt_name_setup` function is customizable via parameters, a help
function **should** be defined. The user will access it via `prompt -h name`.

The most basic example of this function can be seen below.

```sh
function prompt_name_help {
  cat <<EOH
This prompt is color-scheme-able. You can invoke it thus:

  prompt theme [<color1>] [<color2>]

where the color is for the left-hand prompt.
EOH
}
```

#### `prompt_name_preview`

If the `prompt_name_setup` function is customizable via parameters, a preview
function **should** be defined. The user will access it via `prompt -p name`.

The most basic example of this function can be seen below.

```sh
function prompt_name_preview {
  if (( $# > 0 )); then
    prompt_preview_theme theme "$@"
  else
    prompt_preview_theme theme red green blue
    print
    prompt_preview_theme theme yellow magenta black
  fi
}
```

### Hook Functions

There are many Zsh [hook][2] functions, but mostly the _precmd_ hook will be
used.

#### `prompt_name_precmd`

This hook is called before the prompt is displayed and is useful for getting
information to display in a prompt.

When calling functions to get information to display in a prompt, do not assume
that all the dependencies have been loaded. Always check for the availability of
a function before you calling it.

**Do not register hook functions. They will be automatically registered by the
`prompt` function.**

The most basic example of this function can be seen below.

```sh
function prompt_name_precmd {
  if (( $+functions[git-info] )); then
    git-info
  fi
}
```

## Troubleshooting

### Fonts aren't displaying properly

On most systems, themes which use special characters need to have a patched font
installed and configured properly.

Powerline provides some information on [terminal support][4] and [how to install
patched fonts][5] which should fix most font issues.

## Authors

_The authors of this module should be contacted via the [issue tracker][3]._

- [Sorin Ionescu](https://github.com/sorin-ionescu)

[1]: https://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Prompt-Themes
[2]: https://zsh.sourceforge.net/Doc/Release/Functions.html#Hook-Functions
[3]: https://github.com/sorin-ionescu/prezto/issues
[4]: https://powerline.readthedocs.io/en/master/usage.html#terminal-emulator-requirements
[5]: https://powerline.readthedocs.io/en/latest/installation.html#fonts-installation

---

## File: modules/perl/README.md

# Perl

Enables local [Perl][1] module installation on macOS and defines aliases.

## Local Module Installation

Perl versions older than 5.14 do not support the local installation of Perl
modules natively. This module allows for local installation of Perl modules on
macOS in _`~/Library/Perl/5.12`_ by altering the environment.

### Usage

For Perl versions older than 5.14, install _`local::lib`_.

```console
curl -L -C - -O http://search.cpan.org/CPAN/authors/id/A/AP/APEIRON/local-lib-1.008004.tar.gz
tar xvf local-lib-1.008004.tar.gz
cd local-lib-1.008004
perl Makefile.PL --bootstrap=$HOME/Library/Perl/5.12
make && make test && make install
```

Install _cpanminus_:

```console
curl -L http://cpanmin.us | perl - --self-upgrade
```

## Perlbrew

An alternative to the above is to use [Perlbrew][2], which allows for the
management of multiple, isolated Perl installations in the home directory.

## plenv

Yet another alternative is [_plenv_][3]. This is inspired from _rbenv_ and
enables switching between multiple binary installations.

The subcommands of _plenv_ is similar with _rbenv_.

## Aliases

Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.

```sh
zstyle ':prezto:module:perl:alias' skip 'yes'
```

### General

- `pl` is short for `perl`.
- `pld` looks up Perl documentation (`perldoc`).
- `ple` executes a one line program in a loop (`perl -wlne`).

### Perlbrew (plb)

- `plb` manages Perl environments.
- `plba` lists available Perl versions.
- `plbi` installs a Perl version.
- `plbl` lists installed Perl versions.
- `plbo` temporarily turns off Perlbrew.
- `plbO` turns off Perlbrew.
- `plbs` switches to a Perl version.
- `plbu` uninstalls a Perl version.
- `plbx` temporarily sets the Perl version to use.

### plenv (plv)

- `plv` manages Perl environments.
- `plvc` List all available plenv commands.
- `plvl` Set or show the local application-specific Perl version.
- `plvg` Set or show the global Perl version.
- `plvs` Set or show the shell-specific Perl version.
- `plvi` Install a Perl version using the perl-build plugin.
- `plvu` Uninstall a specific Perl version.
- `plvr` Rehash plenv shims (run this after installing executables).
- `plvv` Show the current Perl version and its origin.
- `plvV` List all Perl versions available to plenv.
- `plvw` Display the full path to an executable.
- `plvW` List all Perl versions that contain the given executable.
- `plvm` List cpan modules in current perl.
- `plvM` Migrate cpan modules from other version.
- `plvI` Install cpanm.

## Functions

- `perl-info` exposes information about the Perl environment via the
  `$perl_info` associative array.

## Theming

To display the name of the current Perl version in a prompt, define the
following style in the `prompt_name_setup` function.

```sh
# %v - perl version.
zstyle ':prezto:module:perl:info:version' format 'version:%v'
```

Then add `$perl_info[version]` to `$PROMPT` or `$RPROMPT` and call
`perl-info` in the `prompt_name_precmd` hook function.

## Authors

_The authors of this module should be contacted via the [issue tracker][4]._

- [Sorin Ionescu](https://github.com/sorin-ionescu)

[1]: https://www.perl.org
[2]: https://perlbrew.pl
[3]: https://github.com/tokuhirom/plenv
[4]: https://github.com/sorin-ionescu/prezto/issues

---

## File: modules/pacman/README.md

# Pacman

Provides aliases and functions for the [Pacman][1] package manager and
frontends.

## Settings

It is possible to use a Pacman frontend with the pacman aliases provided by this
package as long as that frontend supports the same command line options (The
[AUR Helpers][2] page has a good comparison which lists if the command line
options are pacman compatible).

Please note that installing packages with an AUR Helper is not officially
supported by Archlinux. It is currently recommended to manually build AUR
packages using the [provided instructions][3]. The [aurutils][4] project has a
set of small utilities to make this easier.

To enable a different Pacman frontend, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_, and replace `'<frontend>'` with the name
of the preferred frontend.

```sh
zstyle ':prezto:module:pacman' frontend '<frontend>'
```

## Aliases

### Pacman

- `pac` is short for `pacman`.
- `paci` installs packages from repositories.
- `pacI` installs packages from files.
- `pacx` removes packages and unneeded dependencies.
- `pacX` removes packages, their configuration, and unneeded dependencies.
- `pacq` displays information about a package from the repositories.
- `pacQ` displays information about a package from the local database.
- `pacs` searches for packages in the repositories.
- `pacS` searches for packages in the local database.
- `pacu` synchronizes the local package and Arch Build System (requires `abs`)
  databases against the repositories.
- `pacU` synchronizes the local package database against the repositories then
  upgrades outdated packages.
- `pacman-list-orphans` lists orphan packages.
- `pacman-remove-orphans` removes orphan packages.

### Frontends

## Functions

- `aurget` clone an aur package.
- `pacman-list-explicit` lists explicitly installed pacman packages.
- `pacman-list-disowned` lists pacman disowned files.

## Authors

_The authors of this module should be contacted via the [issue tracker][5]._

- [Benjamin Boudreau](https://github.com/dreur)
- [Sorin Ionescu](https://github.com/sorin-ionescu)

[1]: https://www.archlinux.org/pacman/
[2]: https://wiki.archlinux.org/title/AUR_helpers#Comparison_tables
[3]: https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages
[4]: https://github.com/AladW/aurutils
[5]: https://github.com/sorin-ionescu/prezto/issues

---

## File: modules/osx/README.md

# OSX

Defines [macOS][1] aliases and functions.

This module must be loaded _before_ the [_`completion`_][2] module so that the
provided completion definitions are loaded automatically by _`completion`_
module.

## Settings

### Dash Keyword

To change the keyword used by `mand` to open man pages in [_Dash.app_][3] from
its default value of 'manpages', add the following line in
_`${ZDOTDIR:-$HOME}/.zpreztorc`_ and replace the **keyword** with the one
configured in [_Dash.app_][3].

```sh
zstyle ':prezto:module:osx:man' dash-keyword 'keyword'
```

## Aliases

- `cdf` changes the current working director to the current _Finder_ directory.
- `pushdf` pushes the current working directory onto the directory queue and
  changes the current working director to the current _Finder_ directory.

## Functions

- `mand` opens _man_ pages in [_Dash.app_][3].
- `manp` opens _man_ pages in _Preview.app_.
- `pfd` prints the current _Finder_ directory.
- `pfs` prints the current _Finder_ selection.
- `tab` creates a new tab (works in both _Terminal_ and [_iTerm.app_][4]).
- `ql` previews files in Quick Look.
- `osx-rm-dir-metadata` deletes _`.DS_Store`_, _`__MACOSX`_ cruft.
- `osx-ls-download-history` displays the macOS download history.
- `osx-rm-download-history` deletes the macOS download history.

## Authors

_The authors of this module should be contacted via the [issue tracker][5]._

- [Sorin Ionescu](https://github.com/sorin-ionescu)

[1]: https://www.apple.com/macos/
[2]: ../completion#readme
[3]: https://kapeli.com/dash
[4]: https://www.iterm2.com/
[5]: https://github.com/sorin-ionescu/prezto/issues

---

## File: modules/ocaml/README.md

# OCaml

Initializes [OCaml][1] package management.

## OPAM

[OPAM][2] is a package manager for OCaml.

This module enables local package installation with OPAM by extending the
relevant path and OCaml variables.

### Usage

Install packages to your local package directory with `opam install`.

## Authors

_The authors of this module should be contacted via the [issue tracker][3]._

- [Sebastian Wiesner](https://github.com/lunaryorn)

[1]: https://ocaml.org/
[2]: http://opam.ocamlpro.com/
[3]: https://github.com/sorin-ionescu/prezto/issues

---

## File: modules/node/README.md

# Node.js

Provides utility functions for [Node.js][1], loads the Node Version Manager, and
enables [_npm_][2] completion.

This module must be loaded _before_ the _`completion`_ module so that the
provided completion definitions are loaded.

## nodenv

[_nodenv_][5] does one thing well - it is concerned solely with switching
Node versions. It is simple and predictable, Just Works, and is rock solid in
production. nodenv is forked from the popular [_rbenv_][6].

This will be loaded automatically if nodenv is installed in `$NODENV_ROOT`,
_`$XDG_CONFIG_HOME/nodenv`_, _`~/.nodenv`_, or `nodenv` is on the path.

## nvm

[_nvm_][7] allows for managing multiple, isolated Node.js installations in the
home directory.

This will be loaded automatically if nvm is installed in `$NVM_DIR`,
_`$XDG_CONFIG_HOME/nvm`_, _`~/.nvm`_, or is installed with homebrew.

## Variables

- `N_PREFIX` stores the path to [_n_][8] cache.

## Aliases

Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.

```sh
zstyle ':prezto:module:node:alias' skip 'yes'
```

### npm

- `npmi` install a package.
- `npml` list installed packages.
- `npmo` check for outdated packages.
- `npmp` publish a package.
- `npmP` remove extraneous packages.
- `npmr` run arbitrary package scripts.
- `npms` search for packages.
- `npmt` test a package.
- `npmu` update packages.
- `npmx` uninstalls a package.

- `npmci` install a project with a clean slate.
- `npmcit` install a project with a clean slate and run tests.
- `npmit` install package(s) and run tests.

## Functions

- `node-doc` opens the Node.js online [API documentation][3] in the default
  browser.
- `node-info` exposes information about the Node.js environment via the
  `$node_info` associative array.

## Theming

To display the version number of the current Node.js version, define the
following style inside the `prompt_name_setup` function.

```sh
# %v - Node.js version.
zstyle ':prezto:module:node:info:version' format 'version:%v'
```

Then add `$node_info[version]` to either `$PROMPT` or `$RPROMPT` and call
`node-info` in `prompt_name_preexec` hook function.

## Authors

_The authors of this module should be contacted via the [issue tracker][4]._

- [Sorin Ionescu](https://github.com/sorin-ionescu)
- [Zeh Rizzatti](https://github.com/zehrizzatti)
- [Indrajit Raychaudhuri](https://github.com/indrajitr)

[1]: http://nodejs.org
[2]: http://npmjs.org
[3]: http://nodejs.org/api
[4]: https://github.com/sorin-ionescu/prezto/issues
[5]: https://github.com/nodenv/nodenv
[6]: https://github.com/sstephenson/rbenv
[7]: https://github.com/nvm-sh/nvm
[8]: https://github.com/tj/n

---

## File: modules/macports/README.md

# MacPorts

Defines MacPorts aliases and adds MacPorts directories to path variables.

## Aliases

Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.

```sh
zstyle ':prezto:module:macports:alias' skip 'yes'
```

- `portc` cleans the files used to build ports.
- `porti` installs a port.
- `ports` searches for a port.
- `portu` upgrades a port.
- `portU` upgrades MacPorts, the ports collection, and outdated ports.
- `portx` uninstalls a port.
- `portX` uninstalls inactive ports.

## Authors

_The authors of this module should be contacted via the [issue tracker][1]._

- [Matt Cable](https://github.com/curiousstranger)
- [Sorin Ionescu](https://github.com/sorin-ionescu)

[1]: https://github.com/sorin-ionescu/prezto/issues