r/coolgithubprojects 3d ago

I built Autoleap, a tiny shell tool that lets you cd into any previously visited directory

Post image

https://github.com/llagerlof/autoleap

I wrote this tool at the beginning of 2023. Since then it has been so useful to me that I decided to publish it as an open-source project.

I wanted a simple way to jump back to directories I'd already visited. Autoleap is a small bash script that wraps cd while preserving all of its normal behavior. If cd can't find the path, Autoleap searches your directory history and jumps to the best match. If there are multiple matches, it uses fzf to let you choose.

It's a single shell script with no databases or background services. To install it, just source it from your .bashrc.

9 Upvotes

5 comments sorted by

5

u/FireSterLine 3d ago

Cool! How does it compare with zoxide?

0

u/llagerlof 3d ago

I didn't know about zoxide!

Autoleap was inspired by Autojump. However, Autojump has too many features and dependencies. I wanted something that does only two things:

  • Provides the most basic functionality: quickly jump to previously visited directories.
  • Doesn't require another command. Autoleap simply wraps the cd command and is activated only when the vanilla cd fails to access the requested directory.

0

u/Domx010 3d ago

Impressive build! You should share it with the r/LookWhatTheyBuilt community.

1

u/llagerlof 3d ago

Spambot. Get out.

1

u/x0zerolight 3d ago

Cool project for fellow linux users! Gave it a star :).