/iwd

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

Primary LanguageShellMIT LicenseMIT

iwd

License built for works with prezto works with ohmyzsh

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:

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

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

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

Install for Oh-My-Zsh

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

# 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

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

Install for Prezto

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

# 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

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