Skip to content

llagerlof/autoleap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Autoleap

Access any previously visited directory typing cd part_of_path

How to use it

After using the cd command several times, you will have a set of directories that you can easily access like bookmarks. For example:

You accessed the /home/user/Downloads/ once. Next time you want to visit the /Downloads directory you can just type cd Downloads anywhere, or even cd Dow, for instance.

demonstration

How it works

When you access any directory using the cd command, the full path is stored into the ~/.autoleap.history file.

When you type any string after the cd command, the script will try to change to the directory you've specified. If the directory does not exist, the script will search the history file for that string and change to the path if it is found in the history file.

All of this is possible because the script declares a cd function that enhances the built-in cd command by adding new functionalities.

Installation

  • Be sure you use the bash shell, since this script was written for it.
  • Download the script autoleap.sh anywhere.
  • source the script on your .bashrc (add the line source /path/to/script/autoleap.sh to the end of your .bashrc)
  • Reopen the terminal (or source .bashrc)

Acknowledgment

This project was inspired by wting/autojump.

About

On Linux, use the `cd` command to jump to any previously visited directory typing `cd part_of_path`, anywhere.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages