Linux: Navigate directories the easiest way possible

What problem solves?

Linux: Navigate directories the easiest way possible
Photo by Kanjanapa Srisuwan on Unsplash

What problem solves?

What i always bothered me in Linux is that i have to jump between directories all the time, so i created a small tool that i hope it will be useful to you as well!

The code is available to my github repo!

GitHub - kpatronas/popper: Navigate between directories the easiest possible way!
Navigate between directories the easiest possible way! Allows you to push a directories in list and then navigate back…

How it works?

Allows you to push a directories in list and then navigate back to a pushed directory by selecting the directory from a menu.

How to install

After you clone the repository you have to do the following

Copy the file in /bin

chmod +x ./popper.sh 
sudo cp ./popper.sh /bin/popper.sh

Create an alias to your ~/.bashrc (required)

The way that the script works needs to be called within the same bash shell and not to create a new one, to do this we use an alias and the source command.

alias popper='source /bin/popper.sh'

How to use

Navigate to a directory and enter

pwd 
/home/kpatronas 
popper -u

Navigate to another directory and enter again

cd /home/kpatronas/work 
popper -u

Now to list the pushed directories

popper -l 
/home/kpatronas/work 
/home/kpatronas

To go to the one of the pushed directories

pwd 
/home/kpatronas/work 
popper -o 
1) /home/kpatronas/work 
2) /home/kpatronas 
#? 2 
pwd 
/home/kpatronas

Enter the number of the directory and press enter, now you should be in the selected directory.

To delete an entry from the pushed directories.

popper -d 
1) /home/kpatronas/work 
2) /home/kpatronas 
#? 2 
popper -l 
/home/kpatronas/work

You can also go to a directory and delete the entry at the same time.

popper -d -o 
1) /home/kpatronas/work 
2) /home/kpatronas 
#? 2 
popper -l 
/home/kpatronas/work

To delete all entries.

popper -f

I hope that you will find this tool super handy and makes your Linux use easier!