Control The computer with one command

Create Your Own Command With Autocompletion and Control Everything With It


Everyone that use linux knows about the function of scripts - Do regular repeated stuff.
What about a lot very small things that you do a lot but that don't live in one continuoum?
Like for example:
If you have a lot of directories that you enter regularly and live in a very long path that you have to remember and anyway yse TAB to autocomplete.
Specific Examples:
You have:
Project directory that lives in /home/username/work/projects/devops/ci/jenkins/project_name
More general information on your work and tasks that lives in /home/username/Documents/work/projects/project_name
General scripts for daily use in /home/username/bin
And a lot more...

You don't remember all paths, and you don't want to press for each directory, because if you have 2 directories with the same prefix it starts to be a problem and if you have a lot more than 2 it becomes realy frustrating.
So what's the solution?

Create a command with automcompletion that does everything for you


First of all you want the script to be autocompleted in the easiest way.
What do I mean by that?
You want the script name to start with letters that no other command have. Like if its starts with ls, you will have a lot commands what can be autocompeted to.
Second you want it to be written easily. So a line in the keyboad will be a good solution.
I chose to call the command poiuytrewq
No other command starts with 'poi', it in the basic linux commands, so it will be autocompleted, very easy.
Second, if I do need to write it, or remember it, it is very easy to remember and write.If I create another script/command that starts with 'poi' it will never be a straight line.
What do I mean by that?
Let's assume you have a script that does 'goto' to the paths above
project So the commands will be:
poiuytrewq goto projectsdevops
poiuytrewq goto projectsinfo
poiuytrewq goto mycommands
So to get to devops projects dir you only have to do
poi + TAB + g + TAB + p + TAB + d + TAB
To get to documents of projects
poi + TAB + g + TAB + p + TAB + i + TAB
To get to commands
poi + TAB + g + TAB + c + TAB
Examples of how to use autocompletion: here