All right, so welcome back again. So in this particular session, we try to see is to see how to do more stuff with the group, right. So we try to see how to do sub commands of a sub sub command. So let's see how to work with it. I'm just going to put another file here and then be called as sub write sub group. So it's sub c li.pi, right.
So what we are trying to do that in the previous one, we saw how to group or chain commands, and then we saw how to pass quantities by this particular session, we try to create a subgroup of another subgroup, which is very, very useful, right? For example, the abuse gets before it gets going to get you have commit. That's right is another command on the command to 30% of kids. Push crit is going to have its own argument. Then you can also have get push origin Then under common so these are all sub commands we'll be trying to see how to do all of these things. So let's see how to work with it the simplest way that you're just going to be important click Like usual I'm going to create our main function as usual pass in our economy perfect, busy stuff that you always use right now let's see how to agree to be late revealed that we did we need to be quick to her face doesn't have to be a first group.
Perfect. Then the next one is going to be the next one we did which is our parents is going to be our period. Periods Come on, then we do another south. Can is going to be another grandchild, great. grandchild. Come on.
Come on. Come on, right Purvis Alessia to agree to the simplest ways just to go with admin referring to the main group here, that command then create our function, our base function that we used if it was meant to be reverse test right? Here's what we did this by now and guess what to create a sub command. This is no more going to be command but is also going to be a group of it. So there's also going to be another group of right then from here can also create another function around it which is going to be the C. diff, reverse Abacus we're going to review the string that is converted to uppercase whether the basic idea behind that is going to be just reverse a string back to this and commit and commit to upper case. Let me expand it here.
Right? Perfect. So that's what you're trying to do. So this is going to be the child and is going to be a grandchild right who is sub command under that particular option. So good to be this. So how do you do this with an S option now to begin with at reverse, but command pivot so that is the basic idea.
Let's add some functions to is reduced to see the first and that is the parent inheritance. Click the group that mean one, then we the main group we are committed is reverse to be analysis. Then we do this same thing. We do the same thing for this right. So that is the basic idea behind this add some functions to it. So I just come to this place and click that ultimate In our passing, delete key, right suicide is something very simple.
In that as an MP, trying to reverse, then I'll come to this place, you pass in a name as usual. From here, we can change it to click. But what are we going to do? We're going to take the name committed to race it, then we are going to a party. Right? That is something very basic.
So you can also do the same T for lowercase, or just copy this one. And then instead of this becoming a part, this is going to be so right. So let's run it and see what you have done so far. So I'll come back to Python three, then our subgroup for now we're going to see how it is we got our base. So let's take for the reverse. Today we're going to hop on comas.
Alright, so the main one is to reverse itself here. Right, then under its reverse, we have some sub prefacing, reverse, do always like to guess I want to do the reverse. Let's come back to this reverse. Then we base our base, just as we saw for the help, which was just to get down to work on the reverse to just come back to this. There's going to be my reverse through, then I'll supply the name as he says, replace it, convert it to lowercase, right? Very interested in what I see.
That's reverse data stuff and committed to a lowercase if I apply to if I apply to upper now, it's going to make it uppercase right. So that is one of the ways of doing it. So we have you seen this particular progress, we also created another option. So this is the Command and it is a sub command. And that reverse right just like we have get pull origin master get push origin master. So the basic idea behind this is very, very useful.
So, apart from making specifying this name as logline, it can change it here, by giving it a name here by coming to this place and go with up to now it's no more going to be reversible. It would be easy. The new supply, let's save it. Let's take let's see. So, I come back to the help. So, now it is up to us taking this particular name here as the name so the name from the function right is how to work with it to kind of do the same thing for the lower so that it becomes nice and easy for the user right and then we come to try to take it we have an upper and a lower, so to run it is going to be in this particular option.
Two is going to be upper Passing our tests of David is going to record perfectly for you. That's the committed to uppercase, Tennessee for lowercase. It's going to convert it to lowercase. That's the basic idea behind how to create sub commands, right it is very, very useful and very, very essential. So that is for the race. So in case I also want to create another function, apart from this, I can also come back to the same place and go with admin.
That correlates with a bunch of this. For the capital I is going to be diff capitalized copy like we do previously, then I can mostly do the same thing to capitalize this. capitalize it from here we can ignore it or not. You can even make it with a sub command, but as the main common English to be using the same community right This one, put it right, perfect. So this relative, see if I come back to the help. Now, a capitalized is a main command.
It's a sub command, right? And then this one is a sub command, right? Very, very interesting. So if I come back to the same thing that we did, I bring the capital IC to life. This is a normal command let's use a normal previous command right at the base. To give good I also want to repeat it I can just do the same thing I did here.
Copy this same here. Lucky's is going to be changing this one from reverse to capitalized. Perfect. Can we just change this one to see capitalized copy tell lies, right? Basically save it now, in this change this one to this option this one to see if it if I come up to the help, I could see that that is a sub commander have an apartment which is going to further north corporate capitalism to cap the lesson Kobe took a package and it is an example. So that is the basic idea behind very, very simple and very interesting to not show Do we have created subcommands is that first you're just going to create your parents command just like you do always then go to create your child commands.
Then on top of it go to bring your main go to group which is referring to this particular main here. Then people who would be the child command or grandchild a sub command. We're going to bring this reverse here we have it right. That is a big idea. sudo vi coming visit windows command now this main dot group, right? Very simple, very interesting.
So thank you for watching and see you next session. Stay blessed.