/bait

Primary LanguageC

BAIT 🪤

The problem

Let's be honest... when using the terminal, there are just a handful of directories where we really do some work on.

Instead of typing, or looking at the history, for our last cd command, why not catch the most active directories in an easy and practical space?

Throw the bait and catch the most used directories.

Description

Bait is a small CLI tool that catches the current working directory every time you call the command.

bait-c

You can review yours catches and jump instantaneously to those directories.

bait-g

The catches are permanent and not tied to a specific session.

All entries can also be easily removed.

bait-r

* got some inspiration from Harpoon.

Requirements

Linux, bash

Terminal type:

  • xterm ...
  • (maybe more, but not tested)

Instalation

Run the following command inside the src folder:

$ sudo make install

... afterwards, add this function to the .bashrc file:

# I know that this is manhoso!
bait() {
  eval $(bait-tool $1 3>&1 1>&2 2>&3) 2> /dev/null
}

The better way to init the bait script is to run the catch command.

By doing so, you will start by creating the file that will persist your data.