A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/zshzoo/cd-ls below:

zshzoo/cd-ls: Automatically `ls` after `cd`

Automatically ls after cd, because you know you always do it anyway. Why not make it automatic?

Install with a Zsh plugin manager

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

Install manually, without a plugin manager

To install manually, first clone the repo:

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

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

source ${ZDOTDIR:-~}/.zplugins/cd-ls/cd-ls.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/cd-ls $ZSH_CUSTOM/plugins/cd-ls

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=(... cd-ls)

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

# make sure your $ZPREZTODIR is set
ZPREZTODIR=${ZPREZTODIR:-~/.zprezto}
# clone the repo to a prezto contrib dir
git clone https://github.com/zshzoo/cd-ls $ZPREZTODIR/contrib/cd-ls/external
# set up the contrib
echo "source \${0:A:h}/external/cd-ls.plugin.zsh" > $ZPREZTODIR/contrib/cd-ls/init.zsh

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

zstyle ':prezto:load' pmodule \
  ... \
  cd-ls \
  ...

By setting the CD_LS_COMMAND environmental variable, you can customize the command to be executed right after cd. The command defaults to the standard ls in case the CD_LS_COMMAND variable is not set.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4