 So I have been very very resistant to the idea of using the fish shell for a very long time and For what I think are pretty good reasons when I originally heard of the fish shell If you used it there were many things that just didn't work because it's not POSIX compliant Which means that all of the bash grips that you have probably aren't going to work out of the box now in most people who heard my argument against the fish shell would always tell me that The fish shell was meant to be your primary shown that Transitioning to it would be a one-time thing and then it would be fine, right? But I was never really interested in abandoning bash because bash is Primarily functional on every system that you could possibly think of it could even run on Windows, right? so I Really have never seen the benefits of fish especially because Zsh has all the functionality that fish has just maybe not out of the box You have to do a little bit of work and that's has always been fine with me You know, I've used oh my zsh I use power to level 10,000 all the stuff you would need to make zsh like fish and You know, it's been fine. It works really really well But recently or at least in the last few releases the fish shell which stands for the friendly interactive shell has done Quite a bit to make themselves Better so today what we're gonna do is talk about the fish shell now before we jump into anything What I want to say is what this video is not this video is not a tutorial this video is not a Fully featured overview of all the features that fish has right? I could not possibly go through the entire fish language I couldn't go through all the features that fish has and keep this video under, you know 20 30 40 minutes So we're just gonna cover the things that I enjoy and the things that I don't enjoy about fish and a few reasons Why I may or may not be switching to it. So let's go ahead and jump into the fish shell So here we are and I have fish set up on this machine here and I've been using it now for oh Maybe two days or so. I think it's been about two days and I have some thoughts So when I was first taking notes for this I went through and I watched the videos that my fellow YouTube creators have made and Most of those are between three and four years old So they are quite old and they all mention the same thing So if I go to my notes here, you can see the things like I I have some of the Positives that it has right. These are the features that I'll be covering here in a little bit So the rest of the stuff here is basically negative like the syntax is different. It's not posix compliant Writing functions is prettier, but the syntax is different. It also ends if statements with, you know, and it has line wrapping But it doesn't use fi like bash does, you know, it doesn't recognize dollar sign for variables It also has its own way of setting the path variables So, you know, all this stuff here from here down in my notes was all negative So this was all before I even installed fish All I was doing here was taking notes from fellow youtubers videos, you know, I watched Luke's video I watched some of DT stuff on fish because he's a really big guy on fish. I watched the linux dabbler's video on fish So I watched quite a few I did some research for this time. So you should be proud of me But then I used it like I installed it and I have to say that none of that stuff is true anymore It seems like in the most recent releases they've done a good job of taking care of basically Everything that I had written down there in terms of negatives for fish So like the dollar sign now works if I do echo pwd, which is a, you know, a variable that you can do if you wanted to It works just fine When I tried fish a couple of years ago just, you know On the off chances of making a video about it. That would give you an error Like it just would not pass through fish without Completely working everything. So the fact that that works is a sign of good progress, right? So let's jump away from my negative first first impressions and talk about the things that are really, really good That I really really enjoy so the first one is going to be the autocompletion So if I do something like this you can see that it does a really good job of having autocompletions And syntax highlighting and that stuff is built in now I'm used to having this stuff because I have built it into zsh So this isn't that impressive for me, but it's done really really well And you don't have to have any extraneous plugins to actually get here. So that's really nice I think that I enjoy the colors more because they're differentiated on fish Whereas on zsh, they're not always differentiated. Sometimes they show up. Sometimes they don't show up And it's kind of hit or miss now. Usually it's pretty good, but you still have places we're missed On fish everything's color coded even if you were to write a function or something like that It would color code. So if you were to do something like if downloads, you know And and what's really cool here is like if you've made a mistake So like I've made a mistake in this function and if you you don't know what it is You have to put a space in between here in order for that to be you know equals, you know, whatever You can just finish that function But as you can see the the syntax highlighting is there and if you made a mistake it would actually Color code itself red so it tells that so that you know you had a mistake That's actually really really cool So autocompletion and syntax highlighting are two of the big features that I really enjoy with my zsh prompt And that they're built in fish is really nice another thing That is spectacular in fish is going to be the Inclusion of the option selector. So if I do ls dash like this and then tab It's going to show me all the options that I could possibly have and that's cool CSH can do that too But what's really neat here is that it actually gives you the Explanation for all of the options here. So you know all Almost all whatever and then over there in parentheses over here It shows you what those things are actually, you know going to do if you use them and on top of all that if you want to You can tab through all of them just with the tab key And then you know you select it and it would actually allow you to select that one and use it That is spectacular. It is so good. And while I do think that you could build this into zsh I'm pretty sure you probably can because zsh also has tab to complete as well within Directory so I don't think it'd be that hard to Implement a plugin or something like that to get zsh to do this. Well, it's built into fish. You don't have to worry about it That's cool Another thing that I'm really going to enjoy that I haven't set up too much yet because I just haven't got into it Is abbreviation? So the way I understand Abbreviations is that they're kind of like aliases only instead of being an alias It is a an expansion So if you've ever used like a text expander before like on mac or something like that Or maybe you just used one of the text expanders on linux You can have it so that if you type in like uh I don't like gp or something like that It would then expand to whatever that's supposed to be so like get pull or whatever it could be an expansion And it would just expand whereas with aliases that just stays gp So if I open up another terminal here, which is still in zsh if I type in v V I have alias to end them But if I hit space and then just you know do something like this You know, it works just fine But if I go back up in history, it just says v test dot txt It doesn't actually tell you what that alias is now You can set it up again to do that if you want to but with fish I also have v here and if I space after hitting v it actually expands to end them now Obviously you have to set that up But it allows you to then if I wanted to do something like this I go into the fish config, which is this is how you set up an abbreviation right here abbr Space the thing that you want to type and then the thing that you want to expand to and what's great about this Is that if I go back up in history? It actually shows me the actual command not the alias So if you are someone who has a ton of aliases and you can't kind of keep them separate But you sometimes want to go back in history and know what commands you're doing This is a good way to knowing what those are without being confused by the aliases now Most people have their aliases down so that's not that huge of a deal But I will say that abbreviation functionality is really good and really cool I'm not so sure that it is an improvement over aliases so much that it would make me switch to fish alone But the fact that it exists is really really nice Now you can add abbreviations and stuff right from within the current session So you could do abbr dash dash add and then something like gp and then get pull You know like that if you wanted to do that and then you'd had that and if you did gp And then expanded it out it would replace it would get pull But when you closed fish if I Exited here and got out of fish and then went back to fish gp would not actually work again because it's gone So it was just for that one session So if you wanted to add an abbreviation just for the session you can do that It's similar to how you could do that with alias So if you go into If we exit out of this again and do alias Uh gp equals get pull like so and then gp did gp again, you know, it would you know say that Obviously, I'm not in a get repository. So pulling is is stupid, but the idea the aliases there is Active until this session goes away. So you the abbreviations works very similar to aliases just with the addition of being able to expand within the history So that's really cool So let's go ahead and move on then to some of the things that I found that I don't really care for now. First of all I will say before actually before I do that. Let's let me show you that the fish shell actually does a fairly good job of Running scripts that are bash So I have a bash script here called time.sh. All it does is display the time along with some icons So if I do dot slash time dot sh like so it'll actually show me the time Just like you would expect now if I them into time dot sh You can actually see that there are very this this is actually a shell script not even a bash shell script So this is this posix compliant as you possibly could get Uh, well, I mean in theory, right? I mean, I'm I'm not a professional bash script or or script or at all so I'm sure there are some errors here, but you know in theory the idea here is that it uses all posix compliant script, right and Technically fish doesn't support that stuff or at least it didn't right, but it does now So there's a dollar sign here. There's a dollar sign down here a lot of this stuff in previous Instances of fish would not actually work and it works just fine Now the other thing that I want to talk about is the path thing So if you are a normal person who uses bash You probably have a couple lines that look like this here Uh, it's possible. It's all in one line. Maybe it's not an if statement. Whatever It's something similar where it basically is defining the paths that you have on your system Now the path if you don't know is a system on linux that allows you to have basically all of your Executables and binaries in certain places. So these are defining the directories where all of your executables are located Now most linux systems have at least two paths or at least have two Directories that are in the path variable. So in this particular bash rc. I have dot bin and have dot local dot bin There's usually also some more global path variables that aren't defined in variable in the Bash dot rc. So usually user local bin is also By default in the path and that's the way bash works. It's the way zsh works It's the way shell works. That's just the way that it works, right? It defines the path as a variable path equals whatever and then that directory would be in path With fish as you can see up here on the screen That's not the way that it actually does it. It does it in an if end statement and Obviously, this is kind of similar But it also uses this status thing right and uses set because the default way fish Sets variables is not path equals whatever It's set and then some options and then the variable name and then you know the path or whatever So it's different. It's not the same and as far as I can tell the two are not interchangeable I have not tried to interchange them because I don't want to mess with the path Because if you mess with the path things could possibly go wrong If you no longer have all of your binaries executable by the system, you know things break So I haven't messed around with that and I so I don't know if and this is straight from the fish documentation So it should still be true But I have noticed some things that aren't up to date on it. So it's possible that this has changed I will I will just say that I'm weary of changing the way the path is defined On my system. It's probably the biggest hurdle I have right now to actually switching to fish because I don't actually Want to mess around with that all that much because I just want my path stuff to work And it's not I'm not saying that it wouldn't work. I'm just saying that I'm weary of it if that makes sense Another one of the things that I was a little bit weary about before I actually got into this because I did that research As I said at the beginning was that from the guys who use this Shell all the time It apparently at one point wasn't possible to set it as your default shell Or maybe it was unwise to and it may still be unwise to I'm not sure But from what I can tell from the documentation, there doesn't seem to be a problem with actually doing it So at one point you had to copy it from one place to another in order to get it to be a part of the slash hd shells Directory or whatever that no longer seems to be the case even though it still says it in the documentation It's right inside of user slash bin or whatever And it just sets just as you would normally set zsh or or bash or whatever So it works just fine setting as your default shell So if I do neofetch here you can sell I see I'm actually using fish 3.6.1 And this is my default shell I've logged out logged back in and set it as my default shell and it works perfectly fine So far so if I I haven't done a lot of testing with it as my default shell Just I'll be completely honest with you But it works as far as I can tell just like any other Shell wouldn't it does obviously still have those have those limitations that I talked about earlier If you were going to switch back and forth between different shells, that's probably not a good idea At least as far as I'm aware, especially if you're going to start running Or writing shells in fish going back would probably be a bit of a hassle So if I were to switch to fish and I think I probably will at least on this machine I would probably Continue to write any bash or any scripts that I have in bash or shell or whatever And then just allow fish to interpret them, which it seems to be able to do Fairly well now the final thing that I will talk about here is that I've only used this for a couple days And I've only used it with scripts that already exist So all the scripts that I've tried with it so far work perfectly fine No matter the fact that they're written, you know as a shell script or a bash script They seem to work just fine. I have not run all of my scripts So if you see my scripts folder here, I have you know dozens of scripts So I haven't had a chance to get to run all of them, but the ones that I have have run fine so As you're listening to or watching this video Just know That I haven't tested this for more than a couple days. So there it's still possible that you know I don't understand everything that's going on here. I as I said at the beginning I definitely don't know all the fish ins and outs in terms of the syntax and stuff inside of a script because I don't even know if I'll learn it because I'm not going to be doing any fish scripting at all If I were to use this full time as my shell The reasons why I would use it are because of the abbreviations, which I really do like Because of the syntax highlighting which is built in and a little bit better than the stuff that you can get on zsh And because of the tab to complete stuff that works better Then the zsh stuff does so those are the three reasons why I would use fish if I were going to use it And I think that I'm going to give it a try I'm not guaranteeing that I'm going to stick with it for any amount of time because zsh is my baby I've spent a lot of time customizing my prompt and all that stuff And I didn't even go into the prompt customization in this video because fish has a whole bunch of that stuff Set up for you I think there's even like a web interface that you can choose between different prompts and stuff like that If I remember right, I don't even know if that still exists. I haven't looked into it um I've just been kind of focusing on Making sure that it actually works before I get into the customization of it If you're interested in seeing a video on customizing fish leave a like and a comment below Hashtag youtuber and uh, we'll see if we can make that happen So that's it for this video if you have thoughts on this you can leave those in the comment section below I'm not sure what's going on with the camera here. I'm pretty sure that I Pointed it up somehow when I was moving around my desk and installing my new graphics card. So I'll fix that afterwards Anyways, uh, sorry about that. That's it for this video if you have comments again Comments in the comment section below. I'd love to hear from you if you have thoughts on fish or whatever You can support me on patreon page on dot com slash linux cash You can follow me on massive honor odyssey those links will be in the video description. Thanks to everybody who does support me on patreon And youtube you guys are all absolutely amazing. Thank you for your support. So very very much Absolutely, you guys continue to blow my mind. So thank you so much for your support. I truly do appreciate it Thanks everybody for watching. I'll see you next time