1.1.5 • Published 6 years ago

cd-recent v1.1.5

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

💿 cd-recent

A CLI tool for listing recently visited directories in your UNIX terminal

npm.io

Installation

Install cd-recent globally to run anytime to find out what the most recent directories you've visited are:

$ npm i cd-recent -g

Setup

cd-recent can be setup to either track recently visited directories dynamically (as you visit them) or retroactively by parsing your history file

NOTE: parsing your history file retroactively will not produce absolute paths

Dynamic Tracking

To enable dynamic tracking of recently visited directories simply run:

$ cd-recent -t

Then override the cd builtin by adding the following to your .bashrc or .zshrc:

function cd() {
    builtin cd $1
    cd-recent -a $(pwd)
}

NOTE: Dynamic tracking currently only stores a maximum of 1000 recently visited directories

Retroactively Tracking

Then easily set the full path to history file:

$ cd-recent -H [full-path-to-history-file]

Running

List recently visited directories by running (valid directories will be displayed green):

$ cd-recent

List a specific number of recently visited directories by running:

$ cd-recent -l [limit]

Set a default number of recently visited directories to list by running:

$ cd-recent -d [default-limit]

Manually add to recently visited directories by running (dynamic tracking must be enabled):

$ cd-recent -a [full-path-of-directory]

Reset recently visit directories by running (dynamic tracking must be enabled):

$ cd-recent -r

Help

Display the help menu by running:

$ cd-recent -h

Usage: cd-recent [options]

Options:

  -V, --version                                 output the version number
  -a --add [full path of directory]             adds a recently visited directory to list
  -d --defaultLimit [default limit]             sets default number of recent directories to list
  -H --historyFile [full path to history file]  sets history file to parse when tracking retroactively
  -l --limit [limit]                            sets limit of recent directories to list
  -r --reset                                    reset list of recently visited directories
  -t --toggle                                   toggle dynamic or retroactive recently visited directories tracking
  -h, --help                                    output usage information

Contributing

Feel free to contribute by reporting issues, suggesting some new features or raising a pull request 🤘

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.1.0

6 years ago