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.
command | description |
---|---|
iwd |
Change directory to $IWD |
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
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
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)
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 \
...