Why I Switched Back to Bash, And Why You Should Too

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] I'm a long time user of zsh I've been using zsh basically since I started using Linux and one of the reasons why was because it was very customizable I really enjoyed the functionality that it gave to customize by prompt to add plugins for certain things and it was just an overall really good experience but over the course of the last month or so I came to a realization I don't need all those features because bash actually has all those features and zsh had some downsides to be honest with you mainly it was pretty slow now granted most of that is my fault because I used oh my zsh and that thing slows things down really badly so I tried zsh without all my zsh and I didn't care for it all that much but also it just felt like bash to me so around the time I started the two-year Linux challenge I switched to bash and I have not looked back since so today what I want to do is talk about why I switched back to bash why I think basically everyone should just use bash and and talk a little bit about why zsh was just not something that I needed so that's what we'll do today if you would leave a like on this video I'd really appreciate it it really does help the channel so I switched back to bash and one of the reasons why are the biggest reason why was just that I did not need the extra features that zsh offered but also the features that it did offer I found I could actually get with Bash so if you were to take a look at this and would ignore the neofets you'd actually would not know that this was bash so if I clear this out this is just my regular prompt and it's very similar to The Prompt that I always had with zsh now one of the things I really like to do with my shell is to customize the prompt I want it to look a little interesting sometimes I want there to be icons sometimes I want there to be fancy colors and so like that it's never a functional thing it's always just about Aesthetics but it's just something that I enjoy doing and it always seems more piddly for me to do all that customization inside of bash than with zsh because with zsh you could use oh my zsh and all they had a whole bunch of pre-configured themes and all this stuff and you could customize your prompt without having to do a ton of work which is just right up my alley with bash you always had to do a little bit of extra work of course then I discovered on my batch and discovered that it had basically the same functionality and I learned more about actually customizing The Prompt inside of bash and found that it really isn't that hard it just does take a little bit of effort and by some effort I mean minuscule amounts of effort so that was one feature I was easily able to keep even though I switched back to bash another one was tab completion by having zsh you get something that allows you to type in like downloads like that and when you press tab it will actually complete it even if you don't spell it 100 correctly specifically when it comes to capitalization so one of the things about bash is that it does have tab completion a lot of people think that it doesn't for some reason or at least some of the people who argue in favor of zsh think that it doesn't it does have it it's just when you type in something like this and then press tab it won't actually complete that because there's no such folder spelled that way downloads is spelled with a capital D not a slower case D but with certain tweaks you can actually have tab completions just fine even though you're using bash instead of zsh so the tab completions was again an other feature that I could replicate inside of bash very easily without having to have the overhead that zsh forced on me so one feature that zsh has that doesn't really get easily replicated inside of the bash is the tab completion for CD itself so when you're in zsh and you press Tab in a situation like this it would actually allow you to tab through the entries for the next layer level of directories and files so if I wanted to tab through these it actually highlight this and then highlight this and highlight this as I tab through them with bash it doesn't actually do that it just gives me the results that are would be there and then I'd have to type that in so if I wanted to go in to get things I could do that very easily but I don't have the tab highlighting that zsh has I find that I don't actually miss that all that much to be honest with you another really neat feature of zsh is the ability to partially complete a command from your history so if I were to use CD and then press up I would be able to see previous times I used CD again I was able to replicate this very easily inside of bash so as you can see I was able to replicate all of the features or basically all the features of zsh inside of bash with fairly little work if you guys want to see a tutorial on how I did that you can leave a comment in the comment section below but my point for this video is that the features of zsh while impressive aren't zsh exclusive and oftentimes with the whole extraneous stuff that you can add to zsh specifically things like plugins and stuff like that you can actually slow zsh down to a point where it just becomes really really slow even if you don't use on my zsh and just use the regular plug-in system you can still slow that thing down quite a bit and that affects your workflow even when you're just moving around your operating system it can take you extra time to move in between different directories it can take you to time to LS or run specific command fans if you're compiling things and moving around stuff like that it can take extra time because your shell is running slower with bash I have none of those problems but I actually managed to get all the features that I want so going back to bash just made the most sense for me it allowed me to have the features without the overhead also all my scripts are written in bash now zsh is mostly positive compliant as far as I know I've never had a single problem where I was running a script inside of zsh that was a bash script and it didn't actually work most of the time because the shebang was calling the bash shell anyways and it just it just worked right I didn't have any problems where I was running any of any fascisms inside of CSH even where I was having some issues it's mostly one-to-one I don't think that it's all the way there I'm not actually sure I'm not as much of a script or as some other people so you guys can correct me on that if I'm wrong but the point is because I've never I never had a problem with zsh not being bash compliant but all of my scripts are written in bash and I know mostly bash any specific zsh features inside of scripting files I never learned any of those things so it made more sense to be able to use my bash knowledge inside of bash and not have to deal with anything that zsh might have as an overhang so so just going back to bash made the absolute most sense to me and I've been very very happy with it it's it's astonishingly fast I have the feature features now that I want to have I have tab completion I have the fancy prompt and all the stuff that I seem to require it just works really really well and on top of that of course bash has fewer peculiarities when it comes to the number of files that it creates and requires if that makes any sense to you when you run zsh a lot of times it fills up your home directory with things like Z comp dump and Z history and all this stuff and for whatever reason when I was running zsh a lot of times it would create multiple files like that and I'd end up with a home director that just had a whole bunch of zsh related files and I don't know if that was an all my zsh thing or if it was something else but it was just something that happened with bash I haven't had that problems I have a bash RC file and I have like a history file I think which was there anyways on my system before with zsh so not that big a deal and that's literally it it doesn't crowd my home directory with a whole bunch of files which I highly enjoy my home directory is enough of a mess without zsh adding a whole bunch of nonsense to it so yeah also another benefit to going back to bash is that I was able to take all of my environment various variables which were in a zsh specific file and put them into my DOT profile file and that allowed me to have it in a standard Place some programs when they're looking for an environment variable they look for for whatever reason that I've just encountered this a couple times because usually when an environment variable is run it's just in the system right that's the way it works but there are some programs that I would run which would do a chat for where those environment variables are and then they would actually not find them inside of that profile they'd find them inside of of the the zshn file and that's not where they wanted them to be or something like that it was just a couple of different times that I ran into that problem nowhere near normal but just something that I thought I'd mention so I'm back on bash and very very happy to be so now I think that for most people they just run bash anyways but I see a lot of people also talk about the benefits of zsh and I would say that unless there's a specific feature of zsh that you absolutely need that you cannot somehow get on bash you're probably better off just running bash if you can't find that feature on bash then maybe explore gsh but I would say that bash for 99 of the people can do everything that zsh can do and that means that you're going to be running a system that has a much broader Community than zsh does which would provide you with sport has a better obviously scripting language which is more broadly supported and things like that now for people who are using fish I don't even want to talk to y'all because fish is just really weird so I'll just leave it that anyways that's it for this video if you have thoughts or comments on this you can leave those in the comment section below if you haven't already leave a thumbs up on this video it really does help the channel you can follow me on masterdown or honestly those links will be in the video description you can support me on patreon patreon.com linuxcast thanks to everybody who does support me on patreon YouTube you guys are all absolutely amazing without you the channel is not anywhere near where it is right now so thank you so very very much for your support I truly do appreciate it you guys are awesome thank you so very much thanks everybody for watching I'll see you next time [Music] foreign [Music]
Info
Channel: The Linux Cast
Views: 33,518
Rating: undefined out of 5
Keywords: linux, open source, apps, the linux cast, thelinuxcast, bash, zsh, bash vs zsh, bash linux, linux bash, bash for linux, zsh features, bash features, customize bash, customize shell, customize shell linux, customize terminal linux, customize prompt linux, customize bash prompt
Id: eivhyhZN2F4
Channel Id: undefined
Length: 10min 42sec (642 seconds)
Published: Tue Aug 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.