 Now I finally bit the bullet and started using ZSH, which is probably objectively the best shell I've always sort of known that I just never bothered to work to get a config for it Now of course when I mean shell if you don't know anything, right? It's sort of like bash, but it has more abilities in it. That's basically what ZSH is And I've done a review of fish, which is another one of these improved shells But I actually really don't like that because fish it improves things But it takes a lot of stuff like it doesn't actually have rear real shell syntax It gets rid of some basic things So you can't actually run shell scripts in fish So it's basically just you might as well try and you know use Python as your shell But ZSH is actually good and I want to talk about some of the things you can do with it ZSH unlike fish though you have to set a couple things up like by default actually let me get rid of all my config for a second and By default ZSH just looks really simple. You just have like a prompt. That's not even color You don't have anything fancy. You don't have really even real good tab complete or at least it has the tab complete of basically bash But ZSH is known for having a bunch of cool stuff now first off up here We have Well one thing about ZSH that makes it a little hard for people to use is that by default nothing is active It's not like fish In fact some things aren't even active that are active that are active in bash by default So you have to basically set everything but ever everything's important everything important is in my file here So I'll talk to you about it now by default. I should say Your config is going to be ZSH RC I'm the kind of person. I don't like things in my home directory because it really clutters it up I like to have very few things in there So if you want to move where it is Which I do you can open up Z profile or your profile file and you can just manually say Oh, I want my Z dot dear for my configs to be somewhere else. So that's what I do But anyway, let me let me actually get back to my own config. So first off I enable colors and I set my prompt. That's what this is ZSH does things a little different from bash, but none of it is too bad It's not like terribly incompatible and I don't think history is active either By default. So here I activate history and I set a cache file Which I put my cache directory again some people put in their home directories, but it just gets messy Just put things somewhere else. So the thing there are a couple things ZSH is known for one It has a really great plug-ins the one that I'm using is syntax highlighting So for example, if I you know type stuff in if a command will show up as green You know strings will show up as orange if you have a Command that doesn't exist. It'll show up as you know red. So it'll be like command not found so that you can have you have to install an extra plug-in for that and You have to call it at the bottom of your ZHRC, but that's what I do here I know that one exists either in the AUR in the arch repositories if you're an arch user I'm sure that other distributions have syntax the ZSH syntax highlighting thing as well But you can do that. But another thing that ZSA ZSH has is a really nice tab completion feature That bad that's way better than bashes here. I activate it here Basically how it is so Like in bash you can just type in like a command and then tab and then it'll show you all the things in the Directory you can run this on but if you press tab twice you actually Physically get down into the list and you can select something manually so I can go around here and I can say, you know Give me a list of like these files or something like that But it gets even better because you can actually do that with Options to command so for example, let's say I want to sort Sort files by file type. I forget what that you know that option is I can actually press double tab once I press hyphen And it'll give me a list of all this all the different kind of stuff here So I can you know sort or something like that You know sort by size or something So there's a or sort or at least show them with size So you can do a bunch of things like if you forget the options of command You don't have to run man whatever to look at it all the time if you just you know you use your tab complete So anyway, that's what all these lines do and I also this one last here This one here it enables you to tab complete dot fight like hidden files I don't know why that isn't default. I sort of prefer it that way. But anyway, I just put it in there now like bash You do have an option to have Vvi mode vim mode in Zsa show if you're a vim user, you're really gonna want this of course. So the idea I have mine So if I have just like a you know straight up bar For my my little, uh, I don't know cursor what whatever it will cursor What's the word I'm looking for? You know what what I'm typing stuff on That means I'm an insert mode But if I press escape I can go into normal mode And so now all my keys are vim shortcuts So, you know, I can press things like, you know, B to go back W to go forward a word or you know typical vim keys stuff like that. In fact the zsh But vi mode is a little better than the bash mode because you have things like visual selection and stuff like that I don't know. Do they have like deleting things in parentheses and stuff like that. No, they don't have that that would be really cool But the it is better than bash because you do have that ability to you know, use visual mode and I also One thing that the I don't think I don't know if they have it by default in the vi mode But I put it in is if you want to open up a command in If you want to open up your command in vim to like modify it I just threw in these two lines here. So if I press Control E, that's what it does. So let's say I want to like modify this command in vim I just press control E now I'm like an actual vim buffer where I actually can do things like delete inside the parentheses or whatever and Yeah, so and it also doesn't automatically run it when you leave the vim buffer, which it always annoyed me about the bash vi mode But anyway, okay, I don't actually want to run that Okay, so what else do we have so one of the big things so I mentioned in the vi mode I have the bar cursor when I'm just like an Insert mode and then the like big fat cursor the thick cursor when I'm in normal mode That actually takes a little bit of finagling to get so that I think all of this does that and again You can check in the video description. I'll have my whole config file But that's what all this does and basically just checks to see what mode you're in and it uses whichever cursor you want One other little vim flourish that I basically find mandatory Is when I'm going through, you know, let's say, well even let's not even do that When I'm going through the menu like this by default, you're supposed to use the arrow keys I can't stand that I want to use vim keys for that. So that's what I do. So you can remap these All this stuff here. I've remapped them so that I can use vim keys to like move around in this This isn't the fault now, of course, there's a downside to that You can't type with hjk and L while you're doing that But usually once you're if you're moving around selecting something, you're not you're not going to be typing. So So there's that let's see what else. Oh, yeah key timeout That's recommended you set to one if you're using vi mode and one a couple other things. So this is another little nice thing So first off in terms of file managers recently I've been using LF which is like a ranger, but it's you know, not written in Python One nice thing you can do is let's say I want to navigate to a directory So I want to change directory to some place that oh, you know I it'd really be helpful if I had some kind of visual key for that Well, I I've actually made it so I can just press control o at any time now I've actually gone into LF so I can go to whatever folder I want Let's say I want to go to the science folder or something like that and go in here and then You know, if I press q you'll actually see wherever I last was I will have cd to this directory Okay, so I can basically what this does is whenever I press control o I can just navigate wherever I want and that's that Okay, so it automatically changes the directory So that way you don't have to you know change directory manually by typing cd all the time and cd to blah blah You don't have to type it out or something like that And you do this with this little line here. Now, of course, you have to have LF installed I guess you could use ranger or some other directory or excuse me file manager or something like that And basically you just bind I've been I bind control o to run LF or this particular function this wrapper that Uses LF and then it takes your last directory and changes it to it So that's a nice little flourish and of course you can do this kind of stuff in bash too Like you you can look it up if you want But it's just nice to be able to have a couple shortcuts to certain commands or stuff like that and bond you you can You know have bind key commands for other things like, you know Let's say you want to have a key that opens up your music player your terminal music player or something like that You can do that as well with bind key stuff like that Let's see. I also have my aliases and my shortcuts in a different file So I load them here and I think that's about it for ZSH Yeah, so again some pretty cool abilities The tab completion stuff is pretty cool and the syntax highlighting. I mentioned before You have to put you the syntax highlighting. That's like a separate component you download But it's really nice to be able to use it. It's just very pretty I mean, you know, if you're 50 the fish users always talk about how great it is that syntax highlighting But you know, I think it's much better to use have the same kind of thing with ZSH where it's like a real shell or whatever You know that you can actually run POSIX compliant scripts with and you know properly change shell to it and you know Use it to run all your scripts or whatever Anyway, so that's about it. If you have any questions I I'm gonna put my dot files in the video description, but that's about it and I'll see you guys next time