Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/zshzoo/iwd

Similar to `$PWD`, this zsh plugin saves your initial working directory in `$IWD`
https://github.com/zshzoo/iwd

Last synced: about 2 months ago
JSON representation

Similar to `$PWD`, this zsh plugin saves your initial working directory in `$IWD`

Lists

README

        

# iwd

[![License](https://img.shields.io/badge/license-MIT-007EC7)](/LICENSE)
[![built for](https://img.shields.io/badge/built%20for-%20%F0%9F%A6%93%20zshzoo-black)][zshzoo]
[![works with prezto](https://img.shields.io/badge/works%20with-%E2%9D%AF%E2%9D%AF%E2%9D%AF%20prezto-red)](#install-for-prezto)
[![works with ohmyzsh](https://img.shields.io/badge/works%20with-%20%E2%9E%9C%20oh--my--zsh-C2D33F)](#install-for-oh-my-zsh)

> Similar in concept to `$PWD`, this Zsh plugin saves your initial working directory in `$IWD` for easy returns to the starting point of your session.

## Description

| command | description |
| ------- | -------------------------- |
| `iwd` | Change directory to `$IWD` |

## Installation

### Install with a Zsh plugin manager

To install using a Zsh plugin manager, add the following to your .zshrc

- [antidote]: `antidote bundle zshzoo/iwd`
- [zcomet]: `zcomet load zshzoo/iwd`
- [zgenom]: `zgenom load zshzoo/iwd`
- [znap]: `znap source zshzoo/iwd`

### Install manually, without a plugin manager

To install manually, first clone the repo:

```zsh
git clone https://github.com/zshzoo/iwd ${ZDOTDIR:-~}/.zplugins/iwd
```

Then, in your .zshrc, add the following line:

```zsh
source ${ZDOTDIR:-~}/.zplugins/iwd/iwd.zsh
```

### Install for Oh-My-Zsh

To install with [Oh-My-Zsh][ohmyzsh], first clone the repo from an interactive Zsh session:

```zsh
# make sure your $ZSH_CUSTOM is set
ZSH_CUSTOM=${ZSH_CUSTOM:-~/.oh-my-zsh/custom}

# now, clone the plugin
git clone https://github.com/zshzoo/iwd $ZSH_CUSTOM/plugins/iwd
```

Then, add the plugin to your Oh-My-Zsh plugins list in your .zshrc

```zsh
# in your .zshrc, add this plugin to your plugins list
plugins=(... iwd)
```

### Install for Prezto

To install with [Prezto][prezto], first clone the repo from an interactive Zsh session:

```zsh
# make sure your $ZPREZTODIR is set
: ${ZPREZTODIR:=${ZDOTDIR:-$HOME}/.zprezto}
# clone the repo to a prezto contrib dir
git clone https://github.com/zshzoo/iwd $ZPREZTODIR/contrib/iwd
```

Then, add the plugin to your Prezto plugins list in .zpreztorc

```zsh
zstyle ':prezto:load' pmodule \
... \
iwd \
...
```

[ohmyzsh]: https://github.com/ohmyzsh/ohmyzsh
[prezto]: https://github.com/sorin-ionescu/prezto
[zshzoo]: https://github.com/zshzoo/zshzoo
[antidote]: https://github.com/mattmc3/antidote
[zcomet]: https://github.com/agkozak/zcomet
[zgenom]: https://github.com/jandamm/zgenom
[znap]: https://github.com/marlonrichert/zsh-snap