[Part 3 of 3] How-To Customize GitBash by Converting GitBash to GitZSH + Oh-my-zsh + Plugins

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to the third and the last part of customizing git bash while in this part rather than customizing git bash we would be transforming it bash into a git zsh or gitzis if you like yes that's right we'll be converting our git bash into git siege and unleashing all the zeesh goodies in terms of themes and plugins hundreds of them so starting with a boring theory i have been a bash user for quite some time but the day i met ziesh i ditched bash and never looked back because azish has got a hell lot of things to offer than bash in my experience i found ziesh as one of the most powerful most popular highly customizable shell out there which has got a great potential and one of the features that make z sure really great shell is the plugins about z has got hundreds of plugins available out there uh which can make a user really productive and efficient so do give it a try now in terms of plugin managers for zeesh people may go for some of the top plugin managers like antigen zgen antibody z plug etc but as per our needs of this video we'll be going with the omizish which best serves our purpose here so yes apart from zsh on top of git bash we will be also installing uh omizish plugin manager for the research and i will also show you how to install uh theme using the omizish plugin manager now before we proceed just a word of caution what we are gonna do in this video is not a very standard practice i haven't found any official documentation around this so it's more of a hack if you like so proceed on your own risk all right now another boring theory part uh but it's important to understand what we're doing here so please bear with me so about git bash kit bash actually came from uh msys2 so it's essentially a friendly fork of msys2 now people who are not very familiar with msys2 msys2 in turn is you know again it came from the sequin or at least some part of it so essentially it's the msis which enables git bash to work on windows so this in turn means that if msis has got its repository and a package management system and you can actually install packages on msys then if git bash is built on msys this should mean that we should be able to install some packages on top of git batch as well and this is the idea which we will be exploiting for installing zich on top of git bash so in simple terms we'll be downloading zeesh package from the mcis repository and giving this package to git bash or installing that package on top of git bash doing this basically you will enable the full z support in git bash all right so instead of making you suffer with some more theory i'll just simply you know get cracking so i'm assuming that you might have already gone through the part 1 and part 2 of this video and if you have then you might end up having a git bash installation on your windows decorated with one of the minty themes as you can see on my screen however if you haven't followed part one and two of this video the assumption is that at least you got a you know default vanilla git bash installation on your windows so in my case here i've got uh git for windows installation as per part one and two of the video so as the next step let's head on to the m system repository and download the zeesh package from the msys2 so click on package index search for the package called zish here is each package click on this now click on the zeiss binary package and and click on this file to download it now if you look at the extension of this file it's a dot zst so it's a compressed file but the problem is you cannot open this with the winrar or winzip or any other such tool but rather you would have to use some special tool or software which can unzip this file so if you type dot zst you would see quite a few options of the tools which support this compression and one of them is pzip so this is almost one of the top utility so let's download this utility as well let's download the 64-bit done of course if you want you can you can use any other tool you like which can support.sd file so i'll just simply install it standard installation next install finish all right so we have successfully installed pzip so it's time to uncompress a file we downloaded so right click psa extract here done now for some reason it has again extracted it into a tar file because there was a dot and dot zst you see so i will again uncompress this tar file as well done this is what we are looking for let's open the folder so here we got our uh binaries for zeech finally unzipped now next we'll be putting this zich package uh into our git patch folder and that's where the little trick is so let's head on to our gate installation folder which is in c drive program files get now the problem is that i can't simply copy the contents of this zich package into my git folder because uh there are duplicate folders you see it's got a edc here this one has got idc here it's got user folder here it's got a user folder here so that's where we applied a little hack and what we can do is we can actually copy the contents of this folder into the contents of the gate folder so let's copy the etc contents first click on the etc for dish click on the etz for git and let's copy the dish into the etc forget done come out of this it is done let's go to the user folder now and let's go to the user folder for it so as you can see it's got a bin it's got a bin here lib share lib share so we'll be doing the same thing copy the bin into the bin copy the contents of bin folder into the bin for kit done next is lib so open the lib forget copy the whole css done next is share so let's open the so let's open the share for kit simply copy this user share is a share this should do the trick done so basically what we have done here is rather than installing or configuring zis we have merged the contents of this package into the kit which would do the trick for us so let's close these let me get rid of all these installers and now and now relaunch our git bash once again let's close this one now in order to check if our trick has worked typed the research and here you go congratulations you have successfully installed zeesh on top of git bash so now your git bash is also gitzish alright so far so good but hold on the real magic is yet to happen now when you launch your zsch for the first time it will ask you to create at least the dot zs hrc file which is basically a zeesh profile configuration file so i will choose option zero to create a very basic uh there is hrc file choose option zero and we land on the z prompt so this this is basically now your git zeesh so if you compare it with the previous prompt which was this one the git bash so this is the git batch prompt and what we got here is the gitzish all right so let's carry on now before we proceed to uh install omyzies the plugin manager we mentioned about let me show you what it has done so far so if you go to the user profile you will see a dot zs hrc a new file being created so this is where your settings reside for uh zsh so let's head on to the omizish repository on github and omizish is basically as as you mentioned you know it's a it's a plug-in framework so in order to install this it's very simple uh we will just use this girl command so let's copy this and head back to our let's copy the command now what this command will do is basically it will create a dot oh my z folder which will be essentially the oh my dish repository so it will clone the repository into a folder here in your user profile so let's hit enter done so what it has done is it has replaced your old dot zs hrc uh it just taken a backup of the old one and it's created a new one so if you head on to your user folder you would see uh this is the old one it has taken a backup of the old ones and it has created a new dot zs hrc profile file and here you see the omizeesh repository being cloned that's it so this completes our oh the installation on top of the zsh now with the installation of omizeish you get access to quite a good number of themes which are mentioned here on the on the repository for my dish so these are the themes which get available by default quite a long list or you can see the same thing in this folder so all the themes are located in this directory now you can choose any of these themes and you need to specify what theme you want to use into yours.shrc so let me show you that [Music] so this is our uh zeesh profile file and as you can see the default uh theme is uh robbie rushel so you can replace it uh you know place the value of the theme with any of the themes you want so that's that now though we got a long list of uh you know default themes which comes along with the oh my z but in in some sense these are still uh you know basic themes so in this video i will take you through the installation of one of a really powerful theme which is called power level 10. it's a quite advanced theme so let's make our kids even more fancier with power level 10k so if you scroll down see the installation procedure here so just copy this command what what this command will do is basically it will clone the power level 10k repository uh into the themes uh inside the oh my dish custom themes let's copy this head back on here paste and just press enter and it's done so as you can see it has cloned uh the power level 10k repository into inside the ohm by z folder in the user profile in the user directory sorry now all we need to do is uh we need to tell our zeesh profile to launch the power level 10 theme so we will modify our dot js hrc and we'll specify the power level 10 theme here right power level 10 sorry there's a k as well and save now let's relaunch our terminal let's exit this first now we are back on to the bash prompt so launch the zero switch again and as soon as you uh change the theme to parallel 10k a configuration wizard for power level 10k theme will run it will ask you you know various questions in order to create a profile for you so let's answer these questions one by one does this look like a diamond yes lock yes debian yes overlap yes unicode yes disconnecting solid i wanted left let's go for white pixels no yes and here you go the bobbin 10k theme again uh you know backs up our zs hrc and creates a new one so once you go through all the options uh for the p10k theme which we just did it will you know start with a kind of default look and feel which you can further customize by going to the dot p 10 k dot z research or even before that let me show you uh the reason why uh you know the glyphs you can't see properly the reason is that we have not chosen the correct font so i would recommend watch out my other videos especially the one where i recommended few fonts for notepad plus plus the recommended def font for powerline 10k is maslow so watch the video for notepad plus plus and look out for the installation of meslow font once you install the muscle font you can choose the font here or by editing your dot mint trc if you're already running minty themes so in that case you need to modify your minty rc and you would see the maslow lgs nf as the font so let me correct the fonts and relaunch this again and once i do that you would see you know a much better prompt with all the nice glyphs so let me exit this first and relaunch go to research so as you can see as soon as we do the dsh the prompt changes because now we are into the z shell so let's navigate to some repository to see the actual prompt here is your new prompt so i've made some tweaks in the dot p10.0 behind the scenes which is this profile file there are literally hundreds of options uh in the power line theme which you can modify so let's go back to our home directory and let me show you so uh this is the configuration file for powerline 10k theme and you can see there are hundreds of options literally to customize your z shell prompt so i've tried a few things here which gives me the prompt which you just saw let's try a few commands so this is your new uh git bash or rather i should say git zeesh as you can see the look and feel is totally different from the default git bash plus you get the power of zsh as a shell as well as some powerful plugin manager like omizish with hundreds of theme options totally configurable customizable and before we sign off let me give you two plugins as a bonus so let's go back to our working directory first and the first one is uh zero such syntax highlighting so it will basically color your prompt even more so let's install this oh my dish simply copy this command and paste run it done that was quick the next one is the auto suggestions so this gives you fish like suggestions let's go to install md oh my zish again copy this command and paste and run once you've done this you need to update your dot 30 hrc to include these two plugins so let's do this find the plugins and here you need to mention all your plugins or whichever plugin you want to use so let's do the research go to suggestions and space the other one is sh syntax highlighting and the git is already there so let's save our file now we need to we can come back out of the research so that we go back in and it gets sourced so now you can see uh type some command and you can see the auto syntax highlighting and auto suggestions so if i do cd so as you can see it's giving me the automatic option of the home directory so let's go to so you can see the auto completions and syntax highlighting quite better than the bash so that's all guys so here's your new git zish and this is your gate bash so actually uh you can use them side by side as well i am i'm not covering how to by default enter into zsh for a reason because i do i i want to keep both patch as well as the research so otherwise if you research a little bit you can actually tweak your bash uh to actually you know enter directly into this zset shell every time you launch by default so i i don't like setting the default shell because i still want to use bash so i'm not doing it but if you want you can do that you can set your default shell to zsh and apart from this uh as i told you there are using the gsh and the omiz plugin gives you access to if you go to the oh my wiki and click plugins this is a list of plugins that are available to your home isis as you can see it's a long list very nice plugins so that's all i guess hope you liked your kit patch transformation into good dish have a good time with the zsh that's all for today thank you guys enjoy bye
Info
Channel: Automation Dojos
Views: 10,982
Rating: undefined out of 5
Keywords: TestOxide, Automation, Linux, JMeter, Tushar Sharma, Git, Github, VCS, GitBash, customize GitBash, GitBash Themes, GitZSH, ZSH, GitBash and ZSH, ZSH Theme, Oh-my-zsh, GitBash Plugin, ZSH Plugins, Powerlevel10k, Git with Powerlevel10k, GitBash and Powerlevel10K, Automation Dojos, Automation Dojo
Id: SE1UtrtH9mo
Channel Id: undefined
Length: 20min 0sec (1200 seconds)
Published: Sat Jun 05 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.