Bash is probably the most commonly used shell. It has lots of features and powerful scripting capabilities. But when it comes to user interaction, that shell is better, most of its power comes from the awesome framework Oh my Zed show. In this chapter we will be installing that shall we the Omi virtual framework, and we will be looking at some basic configuration options. To install virtual use sudo apt install virtual after installing it, go to the link on the screen and follow the instructions for installing the Omi virtual framework. The selection process is a one line command with curl or w get.
So let's run the curl command. And as we can see, the command is giving an error sorry, saying that get is not installed, so we need to install that also, a command is simple sudo apt install get. Notice how easy it is to install software. In a boon to this is also a big productivity booster. Every common software package we might need is already pre packaged in the remote software repository. And it takes us just one command to add new software to our computer.
Now that we have get installed, let's run the command again. We can see that this time it's successful, and it's bringing us to our next shell dot new shell. Oh my Zed shell also changes the default shell to set shot. So after installing the first thing to do is to go pick up vim to see all available VMs run this command. Also, we can go in the repple and check out the VMs together with their screenshots. For the purpose of the course we will use the candy theme because it has a lot of useful information.
Should your prompt username hostname time folder and git branch or a status time can be very useful. For example, if you want to know how long the command took to execute, and you didn't use the time utility to measure your commands total time. Then you can also check out the prompt and see the time when the command started, and the prompt when it finished, and thus you can calculate the total time to change the theme. Open the configuration file and modify this variable. Save the file and open a new terminal window. Let's initialize an empty get directory so we can see how the problem looks.
You can see here we are on the master branch. Let's create the file say readme.md. The Asterix In the prompt shows the directory is not clean, we can verify this with git status. Okay. After we clean up the directory the Asterix is gone. If we change the branch, the prompt shows that we are on the new branch.
Let's quickly create a demo run get branch test, get checkout test, and you can see the branch name in the prompt. other cool features command completion. Start typing for example, IP and press tab. And we can see all the commands that start with IP and we can hit tab again to start navigating through the different options. You can use the arrow keys to navigate and hit enter for the desired command params completion for example, Alice and the minus sign and that and we can see here all the options The short description for each tab again to start navigating through them and enter to select history navigation. arrow up to search in history filtering by the string that is written before the cursor.
For example, if I type vim and arrow up, I can see all the files open with vim in my history, history search, control error and start typing and controller again to search. The same occurrence the same occurrence in history. For example, Tilda and Ctrl R to see all commands that have started that have tilde actually in the string. Alright. Navigating control plus arrow left or right to jump one word or control but you to delete one word or control you to delete the whole life CD change directory Complete Completion that is case insensitive. For example, see the doc will expand into silly documents with BP uppercase CD directory completion.
If we are lazy and want to specify only a few key letters in our path, we can do that too. For example, CD slash us slash s hash slash, that s plus tab will expand into CD slash user slash shared slash is a child. Oh my god, this is so smart completion, just like gilt and that and you will see a list of bids to kill, change and competition between john and that to see a list of users to change owner Asterix for argument expansion, type ls Asterix and hit tab. You see the Asterix expanded to all files and folders in the current directory. For a subset type ls do Asterix and tab, it will only expand to documents and downloads. That shell also adds a lot of aliases just like LS to see a full list.
Some very useful ones are.to go up one folder.to go up to folders. To see a list of shortcuts from bind key. The terminal is one of the places where we spend a lot of time, so it's really important to master our shell and use it as efficient as possible. Knowing good shortcuts and viewing relevant and condensed information such as our prompt can make our job much easier.