Learn Zsh in 80 Minutes macOS - Oh My Zsh - Command Line Power User | @karlhadwen

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to this za search power user course I'm so excited to have you be a participant on this course whether you bought the costs or you're part of an organization that has purchased the course I am truly excited to show you how to use LSH to improve your workflow templed so what we're going to be looking at in this quick introduction video is all the things that I'm going to be teaching you who am I and a few other little things I want to introduce and show you quickly throughout the video so let's get started so first things first Who am I I am a JavaScript developer who has been working for the past 10 years in the web development industry I have also worked in high-frequency trading a certain trading bank in London I have done a lot of e-commerce in the past so I have a lot of experience with e-commerce e-commerce back-end airbases collections of products and how we can merge those together to get certain optimizations around a particular product right now I'm currently focused on JavaScript react mainly Apollo and Gruff you all so these are the things that I'm using on a day to day basis and generally speaking you're running a lot of commands such as NPM git git pull requests yarn docker so all these things I'm going to be teaching you in these air search tutorials in addition to my professional career I've been creating tutorials online for many years now I have over 300 program tutorials on YouTube you can find that cognitive search and yeah that's me so let's go ahead and have a look what we're going to be doing in this course firstly prerequisites this is going to be mainly OS X best but most of the stuff does translate over to Windows we're going to be looking at stuff from switching to terminal to item so we're not going to be using command prompt or PowerShell unfortunately these alternatives for windows I can look and I'm sure you can follow along if you do get stuck in using a Windows machine I will be more than happy to help sort of drop a message some sections are going to be specific to technologies that you can skip over so we're going to be looking at stuff like NPM yarn docker and get mainly just how we can productionize our work floors and make it a lot quicker to get these instances running or creating pull requests or looking at the git log without having to type all the command so for example if you find yourself too often in Korean branches in git and type in the full command on terminal will no longer be doing that we can set up an alias and we can do that through something like GCM for example so GCM is just an alias that we're going to be setting up and that will stand for git checkout master we also be showing you how to create pull requests very quickly so once you've added all your files staged them committed them push them all you have to do to create pull request will be GPR in addition to this I'm going to be looking at the Z plug-in that comes with zealous HR on top of that a search which allows you to quickly find folders so you're no longer having to do CD down to nested folders so most of the advanced stuff is going to be around the specific technologies but I think if you use these or really help your workflow become a lot more efficient we're also going to be looking up plugins such as spell check in all suggestions themes specific plugins that I will show you how to install to make your workflow a bit more optimized some of these are optional I tried to keep my terminal quite light as you can see in the video and again this course is focused mainly toward software developers and DevOps on engineers so what we learned you'll learn how to master is at a search with all my zero search on top well speed up your development workflow using a super powerful terminal experience as you can see my terminal is on the screen or has been on-screen and I was just running some commands probably don't make too much sense but once you look at the aliases so it'll make a lot of sense this stops fairly simple to be honest but it's just getting those commands in place so we're going to be increasing your workflow tenfold and it's very very simple you just gotta get your head around all this stuff and once you've created a z SH Posse file where we can configure all of our research configurations we should be good to go so that's pretty much it I am very excited to have you on this course if you need any self help feel free to message me whether it be through udemy or it can message me on Twitter it would be better to message me I knew the mister the community can see particular questions and I can give those particular answers again one thing I like to stress as a software developer is there's no stupid questions so feel free to ask any question and I will do my best to respond this course will be updated so if you do find anything that is out of date on this course just give me a message and I roll up there thanks for taking the time to watch this video I can't wait to get started so in this video we're going to be looking at some of the advantages of the research of a bash and I'm also going to give you a quick overview of all my research which is a community driven project with tons of packages for stuff like plugins themes all sorts of stuff just enhance your shell essentially it's why we're using Zetas surgeon not - well bash has become quite restrictive over the past few years and also the fact that there's more of a community around Zetas says she rushed to me and from what I can tell is more commercially driven as bosses LSH where it's more community driven we have all my zealous edge with which is an open source community driven framework for managing your zsh configuration the research configuration is essentially file that allows you to enhance your zsh shell as SHL can have plugins themes also so crazy stuff that's brilliant such as spelling correction Zed which is a powerful direct research I've learned your most frequent directories and files or can keep going back through those which is really really powerful the spelling correction again that's one of my favorite things because if you're just working quickly through a shell and you just want to hit and I hit one letter wrong in a CD down to like five nested folders it can correct ice brilliant in that aspect we also have stuff like plugins themes so you can get get plugins which are really useful aliases which are amazing and you can do this in bash too but there's a lot more plugins and themes and all this loveliness within zsh so all my research is kind of the cherry on top that I search and bus just kind of doesn't have that what are the favorite things about just advance shells in general it's been adduced of like a laces so if you do GCM I have that self as an alias Oh GCM could be get checkout master I mean so much quicker than just writing get checkout mastering you just do GCM in your terminal you could even set up to hotkey for lights so let's look up some advantages of zero search of a bash as mentioned there's a huge community around zero search there's tons of features for productivity spelling correction which is when I just mentioned and that's a brilliant one directory Alice's git command completion functions where we can open github and do a pull request immediately file globbing which is essentially what we're going to be doing instead where we can just keep globbing directory names and switching terms super quickly where you could do Z and then all you got to do is show a list of your directories you want to visit or you've recently visited and you can click for for example the fourth on the most visited listen you can jump to that really quickly as I said she's gonna be the default shell in Mac OS 10.15 which is gonna be fantastic because most people will start improving and hunch in their shells so if you are running 10.15 you will not have to go through the installation process that I'm going to be showing in the upcoming video simply because it's going to be installed by default bash it has some of its some advantages I guess I did use it in the past it seems us to me it more commercially driven as community-driven and it's no longer than gonna be the default shell on in OS X off ways probably the best that we do start getting some zsh knowledge out there for people because it's gonna be pretty powerful if we're installing Zed SH or a couple are installing Zetas CH on top of all these operating system on top of all these new systems and everyone when they're installing 10.15 on their system it's going to be everywhere so if I the best to get these videos out there sort of some knowledge in the community and we can start making our shells more amazing so in this video we're gonna be looking at installing zero surge and our my zero search it's fairly simple to install is that it simple because it comes by default on the map but it doesn't it's not says the primarily fall that's bash so the way to do this is go into your terminal go up to the left so let's do that one more time go to the left and then just click on preferences you can also click command comma and then shell opens with and switches to a set a search like star when we do that close that down and if I just have a new shell we have a zero stage one here and here bash so every time we open up terminal we should have zero search as you can see here which is brilliant so now what we want to do is we want to install all my dead Sh so go on to the github repo for this and it's fairly simple really basic installation I was mentioned here all my Zetas said she's installed by running one of the following commands in your terminal line you can do curl or W again I'm not gonna run this over cuz it takes a little while and I do have this install already but simply just pop this like this cop it up pop it in there run that command and you should have all my zero search installed which is brilliant because then we can move on to stuff like plugins look at the zealous search file the configuration which is will be really useful and you can get my configuration file at the end of these videos and if you want that already and you just want to skip ahead just go ahead and grab that but yeah we're gonna be looking at all this stuff stuff but essentially just two installs at a search that's all you have to do and to install all my research all you have to do is just run either one of these recommended Goa curl that's installed by default but if Necip so yeah let's look at the next video where we can be looking at customizing terminal a bit ma and eventually once we get set up we're gonna look at themes plugins alyssa's functions stuff forget docker and PM all that good stuff so in this video we're going to be installing item 2 and you can use ever search through the standard terminal but I recommend using item 2 will get all the power of our major research as well and they classify themselves as the OS terminal replacement and I think that's a good classification because it is a brilliant terminal so if you just search item term 2 in Google or whether search engine you use you should get the first result which is item 2 comm an essential is just an emulator which I believe me wrap the original terminal but in terms of technical detail I know I'm not too sure on that but one thing that we will get out of using item 2 is a bunch of fantastic functionalities such as split pans hotkey window so you can read your register hotkey that brings up item to the back ground running and of application so you can open this very easily and we're gonna look at how you can do hockey window and searching this is one my favorite thing so you can search within the terminal it's really good if you're running tests for example if you're in something like react autocomplete is fantastic Marla's coffee that's brilliant pierced history doesn't have a great one we're going to be looking up instant replays pretty good too configurability fantastic we're going to be looking at how we can sell phys ed SH configuration file and there's a ton of other stuff in here as well you've got growl support I don't think many people use growl anymore but you can still get the standard notifications from OSX and they do come up and you do we get bells which is nice you can put profiles in what we're going to much into that to be honest so what's new in version free so you get shell integrations you know a shell prompt is which is nice profile switching in line images see I'm emoticons and stuff like that time stamps password manager as well asked pretty cool if you're in a SSH configuration is quite often annotations that's cool bad geez I've never been a huge fan of bad cheese I think they make your terminal up pretty nasty to be honest but yeah there's a ton of stuff in here item two is just brilliant so I do recommend downloading all you have to do click on download you can get stable or stable release or test for at least go for these step or release and when you get it you should hopefully get something like this I term and then we want to do is drag it into your applications and then late other right so once you've dragged it over into your applications and if you already have item one it will overwrite but if you don't have item whatsoever strike it in there and it shouldn't I show anything whatsoever and when you do have item installed and you can put in your dark or we can look at hot keen which is what we're gonna be looking at as well shortly hot key window which is really good so it can just you know fire item to up really quickly but yeah go ahead up an item to and you should get something that looks like this how cool is up it's nice I've kept it pretty basic Rosetta search which is what we'll be focusing on here we have all my zero search and zero session stalled down and items so we're ready to get going in this video we're gonna look at how to set up your a search configuration file this is most likely the most important aspect of all the tutorials simply because this is the foundation of our plugins themes a Oasis functions so we're gonna go ahead and set this up and there's a few prerequisites here so firstly you're gonna find that the location of this file particular file will go in here as you see I've got backup here of one night of my main file and I can show you what that looks like right now Angela so if I open this up you can see there's a whole bunch of stuff in here which you can download from the resources I'm gonna keep at into this map so often and if there's anything useful you find please let me know and I will add in here because I'm always looking for stuff like this too so first let's want to explain here we're gonna export the research here we can give us theme plugins our source so for example highlight in syntax highlighting in an extension for browsing custom aliases scale aces and PM aliases and just a few comments off left in so I'll clean this up and then I'll I'll put this upon the resources but yes so to go ahead and do this let's fire up item and as you can see it's pretty blonde because we do have a configuration file so what you want to do is essentially we're good with creating this in the root root directory which is essentially this so somewhere we our first list over here and we have zero search highlighting but the quickest way to do this and I'm not sure if you so see you'll see what's in here so we can match this up with where we want to go I'll just some people may start this particular point but what you actually want to be is in is in users then you're using them so look where we are now which is good it's not showing any hidden files which is it's not alarming but I like to send a hidden files on so it can do this in VI or if you have kurds in a board which most likely i don't think that would work unless you already have some self configuration set up so this is the command we want to run which is Z sh then RC so that's the command you want to run and you got to make sure it's in this particular format like sir so when we run that we will create a file inside a search once we go ahead and write to that particular file but right now for example sick let's just go ahead and copy export 0 search so it can do click I then expert 0 surge equals and then put your puffier do not copy my path because it would difference yours and then we want to expose all my zealous edge if not that's not in here so if you go in here and you see that like oh my zester so they'll be the dot on here and these are all the plugins and templates that we'll be using if you find that's not in there drop a message and I can either talk you through this getting the oh my zealous a self again or I can redo a video a few privately or whatever it may be I'll do my best to get you on track with this so once we've done that go ahead and click skip then click shift call on then W queue and that will write to that file and get you out of VI any problems this may be a bit tricky if you're not used to be Ikes it can be tricky for some people and if we're going here you'll see we have a zealous HRC file which is our configuration file if you don't see these all you have to do is do a quick google for sure hidden files in muck we're in your terminal and restart the finder and you'll see our hidden files which I find is really useful and then instead of running in VI so he could kind of do the opposite right you could go ahead turn on all the hidden files and then you could maybe go in a text editor and save a file like this that means you'd have to use the VI editor so we can just right click up and text that it and we can say hello and we can save to that and I'll just show you I am telling the truth and there it is it's in that so it's probably easier than using VI and you can also open this in like vs card however a rough plication you use maybe using something from jetbrains or not plus plus all whether it's acts editor item it may be so yeah that's how you create a zsh configuration file and we'll look at other plugins like these particular ones very shortly but this is a core foundation of your zealous Asian or my zealous edge configurations and combined so drop me a message if you do not manage to get a sell properly but if you have got it at sell properly look at the next video and we shall start getting to the juicy stuff in this video we're going to be looking at how working install on my jelly search plugins it's fairly simple actually if you go ahead and open up your search configuration file which is this here all you have to do is right click up and we have you protected it off yes code on your preferred editor does reside in your Macintosh HD users so I shall using them then you'll find it here we've hidden files on so let's open it up and you can see from the last video we have just exploit our Zed a search configuration well allowing us to get zealous search to use on my zealous edge so to add plugins is fairly simple raela we can take a quick look here as to enable the plugins you want to edit to be edited with your zealous edge file so if completion plugins and there's as such a bundle of plugins that we can go ahead a new so I do recommend technology this website for the plugins that you wish to use because obviously I cannot cover every plug-in that exists because it's far too many and there's a closed foundry one here which is really useful actually this is one that we may look at if you're interested I can add down just let me know but yeah there's tons in here I'm just gonna install some of the basic ones and so now really helpful just to get your workflow increased so to install plugins we just have to do this plugins equals and then we can put in certain plugins you want in here so I can put in bundler these are just some of these hunchy ones I use and then lots of suggestions so we have an array of plugins and then what we wanna do want to source our Zelly search configuration to our old miser search and I want to source again and then we just put users again Doug just copy this make sure you switch out the user name and we want to install the syntax highlighting and this should come with all my zero search and if it doesn't just make sure you go on the website and have a browse for this particular plugin you don't have to do any installation all my zero says should have this one else up out of the box and if we serve that that's just sauce it not want to kill plug in so if we just look down here should be some look up here we have so as to say that this hitch syntax highlight in so it's kind of like the fifth shell fishes an alternate shell but for Zetas search this a few questions on the fa Q's here and I'll show you how these work actually in just a quick second so R ups a few plugins does it work for internal search blah blah blah so essentially what you want to do how to install let's take a quick look we can do brew you have to install proof of this which is home brew and what you want to do is once you do this particular line here it should install this file and then all you have to do is like I've done here is sauce it but I've sourced it directly to my configuration and this is something that you can also do again if you have any issues with this just give me a quick message and we can take a look at this and that's how you activate the plugin what you've done here some plugins you have to do this so many dirty it's just a bit of trial and error really so once we've done that we can serve that and your zealous edge file may not look like this it may be filled with the default template all right recommend just deleting everything in there and going ahead and following this tutorial because we want to make sure that we're building up our own configuration and not using plugins and themes that come by default Rodney or miserly search odds that a search configuration so essentially if you only use a plug-in put it in here if the plug-in doesn't exist by default in the Mizell sh bundler like this particular one just go ahead and source it it's fairly simple essentially what I do is brew install then source the plugin so if we serve this and then we open a item and we should have the syntax highlighting and all complete I do see there we are you can see that it's give it as the author suggestions which is really nice and if you click the right arrow key it should all complete up and I did print working directory and there we are so that's how you add plugins we're gonna look at I didn't plugins in the next tutorial is adding a few more useful plugins and sourcing them but I just want to keep on with the plugins for a bit and then we can move on to themes and then a laces and things of that nature so in this video we're just gonna take a quick look at how to install a plugin generally all the plugins you won't come with the my zsh bundler if you don't want an alternate plugins you can't just sauce them like we did here i'm gonna quickly show you so let me just fire up item and if i do we're gonna install this last working der which basically it says here keeps track of the lost used direct shown automatically jumps for if new shells similar to how terminal emulators do it so if i do lwd it doesn't exist so let's go ahead and just add last working there into my plugins close that and now if i do lwd you see it's not green so we know it's not plug-in or alias and it'll take us there which is really nice so if I do LS so I do applications it's clear that and then if I do lost working der there yeah it's brought as in there which is really nice I do the light that particular plugin so we're gonna keep that in there that's a really useful plugin but that essentially is how you install plugins just you know have a browse around here some of them will be access to external services so like if you are using a Cloud Foundry up you have to make sure you've got a CFO CEO I installed but essentially that's all you have to do to have a look so that like the OS x one here that we've got installed is really useful tab opens a current directory in a new tab so let's have a look at how this one works so do tab I tell my system events and there we are very very useful by the ofd that's awesome it's so powerful so yeah it's really good so it could even do like Spotify show hidden files high file so you can use that in here right like to unhide all unhide the files that you no longer need but yeah that's how you install plugins using is that a search you know my cell research so necessary we're going to be looking at a few more useful plugins the men all be of your tests or something that you need particular for your workflow but I'll show you them just in case you may need these but if you want some reference for finding plug-ins for all my zero surge from the bundler just go ahead and type in our mais le search plugins and it will take you to the page that I previously showed you in the last tutorial but what we can do we can add in some Mulligan's here so I started web search so we can type like Google yarn and it will bring up the yarn documentation in Google all the search results we can approve as Bruce real helpful extract basically extract with us extract like a zip file history su does really good what else yarn as well as really useful so it's closed up let's open up a new tab that should receive online so this is my 0 search brutal game with the advent of the one point release homebrewers decided to bundle as part of this solution so we're no longer the airship is so you will see notifications I thought my 0 search which is really useful and I wanted to show you that so we don't need to install brewing in Mouse so if you find the brewings brew plugin on one of the works make sure you have homebrew installed and you need homebrew install for the brew group looking but if I do web search web searches do Google he'll hide away in our Google and Apple MacBook Pro and this will bring up as you see it's loaded it has loaded the Apple Mara how useful is that so we can also do stuff like history and I think you can just type the hedge for this now bring up all the history which is really nice you can do so if I want to do up an application in sudo instead of typing sudo all the time it's really really frustrating to do that so let's say I want to CD into applications but I wanted to see dear suitor you just have to double click escape twice in order to the beginning which is really useful and you can just well don't want to see the sudo into a directory but if you're open in an application and you want to sudo the application all you have to do is just double click escape twice extract is really useful for extracting zip files yarn if you've usually on before yarns really useful it's just a package manager essentially a dependency manager much like NPM it runs pretty much along the same lines but it'll give you a nice suggestions like yarn add for example young link and all the nice features in there but that's just a few quick useful plugins and you don't have to use these if you don't want to use these you can remove them from the plugins area which is in here I'm gonna keep these in for now and I may modify them but we'll see let me know what plugins you use because I'm always looking for more useful plugins because it's more of a community aspect finding what plugins and what alias is to use its forever building your workflows esearch RC file just to make sure you're always on top of the latest features and also making sure that you are increasing your productivity by using these workflow files because no one wants to be typing sudo or git checkout master all the time but anyways that's how - that's just some of the most useful plugins I use and I hope that was useful so in this video I'm gonna show you how to install themes it's fairly simple and there's a ton of themes that you can install but some of them don't always work too well so just be a little cautious when installing don't think you've done something wrong just the fact of the matter is that so many themes just don't work that well and some of prerequisites too so if you want to install something like agnostic there's also additional setup that you must install so I'm just gonna quickly go ahead and install theme just to show you how this works all you have to do and it's really simple just to zero search when this got theme equals and then type in the field you want and these are all out the my 0 search themes and can install additional themes but these are pretty great these themes but when you do run and I'll do some some configuration T is that Sh RC file you want to restart item and we'll look up in a future we can just type up there to update a shell well there you are look it's installed some sort of theme doesn't look the best honestly but I generally you can change the appearance and stuff in here to female Matic all this stuff but yeah you can install all the themes in here just switch your zero search VM to one of these and like a did so so my prerequisites so if I do bearer in here and if you don't wish to install a theme what I don't install a theme generally that we aren't changes you can use the default theme which is this one here I just install that close this and then it just brings us to here which is it gives us a nice default look with the era which is nice to show us what directory we are in and it kind of just makes it look a bit smoother and less like convoluted so yeah that's how you install themes if you have any questions in relation to this just leave them on here on udemy or give me a direct message and if you do find a nice also leave that in the community answers because as a community wants to see what other themes people have and if you somehow create your own theme through some of the tutorials that email also seen online go ahead and shows that because I'd like to check out some additional themes I do like simple themes though I don't like my terminal looking too crazy but yeah that's how you install as sh-boom so in this video I want to show you a quick trick I know in the past so we do LS in the past if you want to switch between directories you'd do like CD applications let's see what's in here so do LS again jump out so CD let's go back CD again and we're in user so it's a little scene users of care so on a CD it's my own directory you can tap CD / sleep CD space care tab and it will auto complete which is fairly nice right speed up your development but if we do LS again and say okay I'm I'm really tired of typing CD all time we could just type applications tab show all the applications with the similarity name and if we want to go into applications we just click the arrow key right arrow key there's no need to type CD again you can just type the folder name so let's have one more look so downloads or Dropbox or library movies you know what's in there so that's that's pretty much how you do it you no longer have to type CD just type the folder name is brilliant so yeah really quick tip right there but it's very very useful in this video we're going to be looking at how it can have multiple instances of zsh up and on a horizontal or vertical view it's very simple all we have to do is go up to our item shell which is out of this video but you'll be able to either do this with keyboard shortcuts so for example if I want to split another view I can hold down command on the Mac and D and that will open up a horizontal view and I can hit command-d again give me another view and these are all running on profile so you could switch this to bash if you wished or another shell but I recommend sticking with zero search because Bash is is not my favorite and nor is it many of us if we wish to split horizontally you can hit option shift command hitch that will split horizontally but it will ask you what profile you wanna one likewise if you want to open a vertical split with a different profile you can run option shift command V so if I want to split a horizontal screen onto this particular shell I can hold shift command D likewise with this one likewise with this one and you have all these internal shells running which is pretty awesome and if I hit command D on this one I can open up another shell likewise for this one and if I want to do a horizontal one in here come on D I want to do a vertical one in here come on shift D and you can see how it just gets crazy but awesome at the same time so if ya if you want to do this to open up a if you want to split a vertical the shell with the current profile which will be zero say it's just hit command D you want to hit a horizontal shell with your current profile do shift command D and you can do also so good good stuff for this so for example as close all these down and out so yeah let's let's go ahead and open up another vertical one you can you can do that and you can also like you know have the options here where we can split them vertically or horizontally if you want to do it with keyboard shortcut I recommend doing a keyboard shortcuts because it just gets a lot quicker and your work increases so just to recap if you want to open up a shell essentially so if we open up a basic shell and you want to have two shells essentially next to each other and you might have one vertically you do command D if you want to do a horizontal split you do shift command D in this video I want to show you a quick few tips in relation to figuring out or showing directories that you've visited and you want to and maybe you've gone into directory and you've kind of lost track as to where you are so if we list all the directories in here and I do applications I go into applications and I jump out of applications and going to drop box jump out of Dropbox go into music jump out music going to movies jump out there and I want to see all the ones I visited I just have to type ders - ders space - V oh sure all the ones I visit does is really useful it'll show them either in a horizontal author called less depending on which one you give it and we're going to be looking at something called Z in a few videos time where you can get something similar to this where it will remember all the directories you visited and you'll be able to just hit Z 1 Z 2 and you can read them back into these very quickly and that's the power of Z&Z remembers all the most freaking frequently visited does which is really really useful quick back story for this I think we've does from PHP or Python I think this was this keyword was stolen from there but yeah I think that's where it was from I remember seeing the Python career or it may have been the creator of pH pH saying that's where the keyword came from but yeah that's how you view all the directories you've recently gone into and we were looking at a part we'll be looking at Horrors ed very very shortly so in this video I want to show uz which is a really powerful plug-in and it doesn't just come out the box so we have to install it it is very very good it tracks your most frequent directories based on how often you visit a directory and then you'll get like a priority status this is under the hood though just give you a huge list of stuff that you visited and it'll learn what directories job is in so if we go ahead and take a look at Z search we need to click on raw and if you visit this URL I'll just type in Google Zed space z SH and we want to do with this we want to go ahead and go to macintosh HD users and your user over here and then we want to drop it in here so if I just click serve okay now that's served and if I open up I'm gonna open up my user search configuration RC file which is this and you can see here it's in the same directory as Z which we just installed and now what we want to do we want to add Zed in here so let's do a comment instead extension both browsing and then we'll do dot Z dot s hitch I just want to confirm it's in there so if I jump to my directory there it is and here's my zs hitch RC file so let's get rid of that and now that's installed we can start playing around with this so let's go take a look at the instructions and this is something you want to also do because it's quite a learning experience and used to Zed but once you do get used to Zed there's a lot of power that can be used so let's open up terminal pull this down there are just times ed and Ed will give me all the lost instances or folders I have visited so we can jump to the most Marcin Foose instead of having to do like CD or anak yes let's list out the directory supplications we can visit us sir we visit applications jump back type Zed and let's go get in application so I can start getting it on our Z get any on our said learning so here we are with picked up applications which is going on 20 Alice I just want to show you how it picks up our most frequently visited directories let's have a look applications there now it's 28 let's go back into applications it's just giving it like a scar under the hood surf touch that again 32 so if I do Zed applications it will Tucker's in there but if I am nowhere near applications and then halakha Zed we had said applications so you could do Z applications if you wish you know take your top locations I believe let me I'm not sure if this is correct if a.type said and then I want to go into applications you could do Zed for it maybe now that doesn't work that must just be the underlying score so if we take a look here so we can match it gives it a rank CD to the most recent matching foo so say for example I wanted to go into Devdas here let me show you how this works I do Devdas it will take me to Devdas but if I have the director of in that folder I want to go there so if I do Zed dev tips front end he'll attempt it to the front and directory which is really useful and you can be anywhere with this right you don't have to be in the parent directory the child directory the root directory we can just go in there and grab out well we can see the incident essentially and we can also list all the directories matching devtas which is really useful and the similar stuff fierce OCD too high-strung derp matching food so if I do have Z deficits it sent me into depth at site visited depth as modern our front-end and I believe that does that by default but there's a ton of stuff in here so restrict matches to sub directories of the current directory much by rank matched by recent access remove the curandero archer from the date file which essentially just removes it from here so we don't have to so say if I've got dev test and I've got dev toast front end I want to jump in so I want to remove dev toasts so I do Z X depth us and then list recent dev toast is no longer in there right which is really good we could do depth us it sent me into the front end one because dusts subdirectories I seen but we've removed the parent directory but yet Zedd is really really powerful honestly I cannot live without the urns ed at this particular time and you can see he's been around for years right six years as some mayors and I still go in it's still so powerful it's basically just a plugin a logic to jump around directories that you frequently visited and it makes it really useful as opposed to you know CD into your root directory than CD and back down folder tree where whereas if we're four levels deep in directory and I want to go back and want to go back to the the second folder in there and I visited it a few times and summarize that list it'll it knows I've been in there well you can do that we've said it's really really powerful this is a must for your plugins so hopefully this is a really really useful plugin for you and I hope it's helpful in your workflow going forward in this video we're going to be looking at Zed us here spelling correction and this is an old correction Anakin low in particular things are a few types like in LS for accidentally you type SL you can get correct SL to LS and if you click well it doesn't really give you an informative instruction as to what to do but if you take this as n equals no y equals yes and that's pretty much all we have to do to do this if I was click yes it will give us the LS command and it will run that automatically for us it does this all the time and it's quite a controversial topic to be running not not a controversial topic as such but it's more of a controversial plugin to use and it doesn't come out the box as standard it gets included but to actually enable it you have to do self correct set up the correct and not many people seem to like this because it kind of slows down their workflow you can turn this off by doing one set opt and not turn it off but if you only turn it on you can do that so let's just run that let me run SL and we can just look at the commands what it does actually so if I were on s LS do err SL e and if I do SL again do yes it automatically correct that but he seems to only do this for the commands I search it doesn't seem to be too helpful so it's a controversial one in the sense that it can get a bit annoying depending if you wanted to type commands really quickly and you don't want to have to wait around to are correct all this stuff personally I sometimes use it sometimes I don't use it it's one of those really so it's up to you if you want to go ahead and use that if you do want to go ahead and use that just run set correct and that's pretty much it really all you have to do is just you know you misspelled command oh you do like I sell let's do a e and so so yet pops up each time it's a sometimes it's useful sometimes it's not let me know what you think if you think this is a useful plugin or not and yeah it's up to rail if use it it can be useful and sometimes it can get a little frustrating to use welcome to this video where we're going to be looking at zsh syntax highlighting we have already touched on this previously when we were setting up the plugins and it's fairly simple to set up but if you do have any trouble the git repo is here so how to install see the install dot markdown you can install it using homebrews running this and then we have to source it in our configuration file which is here you may already have seen me using this for example when I type a command like LS it'll show dice active in ready or sha diced not but if you do something like hello world you can see it gives you nice syntax I line and this is probably one of my favorite plugins of all those esearch plugins out there because it just gives you that validation as to does this command exist does it work so if I was like MEK duh it shows that that exists but if I put an s on the end it doesn't so yeah that's pretty much how the syntax highlighting works you can see some examples here you may not think it's too useful but over time you'll see that it's very useful when you your brain starts to get used to see these colors and recognize that these commands are actually valid and have been validated by the syntax Island plug-in which is very very useful in my opinion so yeah let me know if you think this particular plugin is useful I see quite a lot of people using actually it saves you a ton of headaches when you are trying to figure out the command to maybe import maybe you've spelled it wrong and you've had a few attempts so if you like do make directory you know that doesn't work with you spacing and then you finally get to make dough you kind of figure out oh yeah that works which is fairly nice so yeah that's that it's a z SH syntax highlighting in this video we're going to be looking at how well we can get away from commands such as our M which is basically removed and we're going to be looking at trash trash is essentially just a safe way to delete files and folders but and all it does is just move them to the trashcan on OS X and it's really nice it isn't as ed sh related as such it's more just CLI related so to install grab this copy that got your terminal install that globally and that measles can run it from anywhere and that should install and I should only took a few seconds honestly so I'll pull up I'll show you this here directory I have then go ahead and just create something in here blah and then let's have a look so let's do blah so now we're in that directorate's do touch test1 dot txt touch to three list up everything and then we have three types files and then what can do is just use trash test1 dot txt likewise and then we'll list all the files not in there brilliant as you can see the big move to the trash they haven't been permanently deleted which is nice and if we go back and then we do trash blah that should be gone too now as you can see it's been removed so yeah that's how you use trash as opposed to RM which is essentially just nice and it's cleaner if you remove something by accident you're not going to blow it all down I can do without you can undo it with trash just go into your bin it's quite like using move MV on the on the mark so yeah that's how you use trash and it's safer and more efficient so in this video I'm going to quickly show you how ileus is work and how we can set up an alias so for example if you wanted to type and I've know I mentioned this a few times get check out master and you probably type in that a lot you may want to air lease up to GCM but in this case I'm going to quickly show you how to set up an alias and again let's go to our Macintosh HD then go to users then your user and then we'll open up our data search configuration file so this is opened up in text and edit and to create an alias all we have to do is just just say my awesome aliases type alias and then give it whatever you want so you could have GCM equals get check out master or in this catalyst up the alias hello echo I love their udemy and then Leslie if these work let's open a new top and now we are that's how you are an alias and I'm gonna show you how we can view all our aliases and then also add a bunch more that going to be really useful this is where the true power of za search will shine through very shortly hello and welcome to this video where I'm going to show you how to update your Z SHRC configuration file so we don't have to always source the file just to update our configuration generally what I've been doing is just creating a new table each time so if I go in here let me open up my configuration actually and we will see this so hello there udemy update me so that will update right - table it's telling me to you know go ahead and essentially update but well I want it to up there I don't want to have to restart a new shell each time so you could do this which is sauce and then you just sauce the file and then if we go back and click hello again there we also do it but that gets kind of tedious and we don't have to do that every time so what we can do is we can run this here alias update so if I go ahead and run serve that and then if I just sauce this one last time then I go ahead and change echo hello there I am of dead and if I just run this hello it will sell dip me then if I just do up there and then rerun Allah that we are update so it sources it nicely that's the best way to do it in my opinion there's probably other ways to do it but it's quickest we have to open a new table or restart the terminal source is a file and we don't have to remember to write all of this one we can just write update so yeah that's it welcome to this video where I'm going to show you how to list all your aliases through the user search shell we use an item for this as we have previously installed but let me quickly show you how to see all the aliases you'll see quite a lot of aliases in a second simply because we've got a few plugins are very leases to like the get plugin the OS X plug-in so let's go ahead and just type alias and I'll sure all your aliases so if you're looking for an alias and you've forgotten it just type this and now we are we are a ton of aliases we've got the yarn aliases which is like Jana Jana dev Yahoo which is the web search from the web search plug-in we have all the on plugins global up there some of these I reset and put them to myself I also like to use a few so I do like to reset them we have a bunch more here so I rd for a removed err which we kind of not do it anymore we're using trash we often make derp which is nice we are map which is web search using Doug Duggar we up history and we have a bunch more in here so we have all the gear leases too but I'm gonna be over right in news with some of my own aliases these are fairly hard to for me they'll fill out how to remember and I kind of wanted to give him something that was a bit more intuitive we help them more get aliases in here now fetch cherry-pick terrific that's very useful we have a bunch more here so like pseudo which is nice we have the pseudo alias which is just the underscore we have G just forget err fine so on fine stuff bundle we have the CD aliases so you can CD back as many times as you want so yeah that's how you view all earless is we have a bunch of them in here and these all come from plugins that we've installed at the beginning but you can keep installing plugins keep creating aliases but we're going to create our own custom aliases very shortly welcome to this video I'm going to be showing you how to set up get aliases we already have a bunch of them but I want to overwrite a ton of them this is mainly because I think the ones I've created or a bit more concise and the ones that come with the get plugin so if we go ahead and open up our zsh RC file we can remove these aliases here and I'm gonna paste in a bunch of aliases that you can grab from my zero search RC file and I'll leave these in the resources but these are the aliases that I think the most useful forget you can add to this if you wish and you can still use the ones that are in the get plugins because to get plug-in comes with a bunch of aliases and you can verify that by just typing alias and you can see there's a ton in here a lot a lot of aliases some of them I don't use so I generally keep these to mind but yeah you can take a look I tend to grab like get at all that's that's in here double we're somewhere here it is i i've taken yeah they get add off bit basically simply because i think thats that's easier and generally when you're working on new branch you will find yourself just using get a doll for all the stuff you've used unless you're doing split commits but that's another topic for another day but yeah these are the ones I use daily so I've gone with these and I found that these work really well and generally if I need to go into stuff like cherry picking and looking at the diff I don't do that that often to be honest I find that these are the ones that work well the git commit here is actually function that we're going to later on but essentially what it does it will get commits with a message and go ahead and you can just write that message so if you do get a dollar I do a nice git commit but also I have added a few different ones like git push and set your upstream to your origin so you can set a remote origin I do like this one master that's GSE so get at all on you commit all and then your message so if you did this in terminal GOC no on the AUSA just this is my new feature and that will do get out and get commit and then you can just do g.push after which will push that up you can also add if you wish one like this so let's just copy this line here and you could do GC a push and get push and that will do you're the adult git commit with a message and your get push you have to be a bit careful that here because the alias is what I want to show you don't work too well like this one here probably what will not work simply because it's using a I'll show you actually why this will not work so for example Sirk let's say y'all show you how this gets read by the the CLI so even though we've said we can do this is not actually possible and that's a nice learning curve because you get to learn things like this when you're going through these particular stages so if I do G CFP it's probably going to say look there's no message and simply because when you're doing typing this is going to do get at all and they've got the git commit a em then it's got do G push and that it never actually gets to the point here where can type in a message it does get to this point but it's just going to go okay the message is blanking it'll push so it probably would give you some sort of maybe I give you an error I'll just allow you to push with no message or it could just add a default message if you wish so what you could do you could just add a default message here like do for commit I wouldn't recommend ever doing this but you know for the the extra points of us to know and why this happens it's probably worth knowing that this isn't a feasible feature or alias so we can delete them but yeah those are just want to recap those are the aliases that I use on a day-to-day basis I generally use this one last GSE so a GSE then I'll just do after that G plush and that's into what really well for me so yeah let me know what you think if there's any others that you really like go ahead and let me know because I'm always looking for for new ones I do like this one from here but I do use quite often but it's not in here so GG Paul so I get pull origin out Paul the current branch from the origin and a bunch of other distant ones as well but yeah just find what works for you and just add them in there I do like having them in here as well so I'd love to do get alias and it it just over writes them what it still works yeah thanks watching hopefully I'm self all welcome to this video what we're going to be looking at NPM Elise is it's going to be similar to the get video so if you just want to skip ahead of all these videos and go grab the configuration that's fine you can find at the end in the resources but I just like to talk of how the configuration actually works so let's go ahead and pull up the configuration did I did it so if we go into users not user users Carl we have a configuration here and then I'm going to pair season again like I said you can go grab these and I'll just quickly talk over them so these are the NPM aliases I again find really useful on my death to their job so NPM install NPM run start run build run devil run test run test watch run test validate and our m and M n which is remove remove force not modules which generally sometimes you do then you do an NPM install it can also flush MPM as well which is really useful so and we can change this to let's say or do that so echo there's posted the bash configuration that I have had in the past and we can continue to keep modifying this as we go along but this is the most useful NPM a list as I find I'm going to do once for yarn too even though we do have the am plugin installed because again like to get one I like to of the right CERN features certain aliases so I can have a better control but yeah if you find there's any more useful MP MLS's do let me know because I'd like to add these to the ever-growing configuration file and I'd like to keep adding to this file and sharing it with the community so I'll be really useful you could do that but yeah that's the NPM aliases welcome to this video where we're going to be looking at yarny releases we do already have a bunch of aliases installed for yarn so I'm just do a quick update because we've decided the NPM ones and we can do alias and we can see with a bunch of want yarn aliases in here already which is good because the kind of basic ones and we want to keep them but will overwrite them at some point I have all I get aliases in here and we also have else do we have in here a bunch of the general ones like yeah your Mac there and stuff like that and let me just test something so if we're looking for our new aliases so like the NPM ones are installed you will find them here so we've got only a few but the very useful ones and again the same should be in here let's have a look there we are so those are the NPM aliases that were just installed and again we do have all the yarn ones that come with the unplug and I don't like to keep the plug in there as well but I'm gonna do the sims I did for the get and the MPI mail Isis I'm just gonna paste in all the aliases did we just copy the wrong ones those are the ones that came from the shell here and we don't want those ones we want these ones so let's go ahead and do yarn aliases and I'll just modify a few of these run for tests these are look good that's perfect these are ones I used it today you're probably using the same stuff if you're using yarn so stuff like story bug test test watch command some people use young commits but if you do have young commits in there that's really useful give you a cue a prompt we got the linter I've got a build we've got the run all the stuff you need generally it's quite similar to what's in here and it really depends I'd like to add Y in there cuz some of aliases are quite similar in here you've got just Y T or Y you see why global coverage upgrade but yeah they're all useful it's good to have your plug in there leases and also your own aliases that's the the best match that I find but again if there's any yarn aliases or MPN or get aliases that you think I should add just let me know and I shall love them welcome to this video where we're going to be taking a look again aliases and this time we're going to be looking at docker there's only a few 4dr but these are the most useful ones I find so again we'll do the same for might piss them in and this file is included in the resources go ahead and download that it would be really useful and they just do a quick up up there it's a saucer file out of a new shell so here we've got an alias for docker stop docker East are darker up doc RM which will remove all your instances of your docker children so yeah that's pretty much it for docker if there's any docket experts out there that find that they're using more aliases or you know full-on commands all the time then please do let me know we can add these to a configuration file and share along the community here yeah that's how you add aliases for docker and yarn and NPM has you seen previously it's very simple just add an alias but these are the most useful that I've been using but I'm only a high-level docker user just a start in docker ice containers and things like that really but yeah that's the docket Alice's hello and welcome to this video I'm going to show you how to get a better git log visualization through your zealous H item terminal generally what you get is something like we need to get log and it's not too bad right but we can make it better so if we go ahead let me just keep it open if we go ahead and go down here and I get aliases and past this I'll leave that on the screen but again is in the resources because it's quite hard one to read that one and then if I go ahead and just do a quick up there do make sure that is valid so git log would you like no I wouldn't and then we can do the G log and you get all the nice linear structure of everything that's going on who did it so you can see there's two different accounts from me one will be on a different get configuration file and it's just so much easier to read and it's so much better so yeah add that in your file and you'll have a nice git log welcome to this video I'm gonna quickly show you how we're going to be adding more aliases and these is going to be over aliases let's call them and I'm going to show you in this video how to grab your IP address and obviously for obvious reasons I can't show you this running or just take my word that I actually does work and if it doesn't just give me a give me a message but you'll see and that's the alias essentially how it does it does a curl request to IP echo and I'll give you a plain address back I obviously can't do this because if someone does buy my IP address to have the opportunity to either dos or check for up and ports on my address so yeah hopefully this comes in use in the future maybe just want to quickly grab the IP address you're on and yeah we'll keep adding two other aliases and I'll show you some of the call releases on keynote welcome to this video I'm gonna be showing you how to check the usage of a folder so we can look at the storage and what's on the disk so let's open up our configuration file go down to our aliases passed in earliest usage equals d you - hitch - D 1 gives us serve open up a new tab we need to add in there our update for update in the source file and if I just go ahead and run usage it grabs all the usage that's in that particular folder so it's telling me that the folder is 700 of 3 megabytes we've got four hundred and forty megabytes in the front end 28 megabytes in the node modules 241 megabytes in the butt the back end so when you make a bison get and then we also have cervical CI in there as well so it's very useful if you've run in projects who's gonna see how much is in there and like for example if I go into the front end you'll see that the usage is most likely going to be the node modules the air we have now a 400 megabytes in the node modules so yeah that's how you run the usage and it's a very very useful alias welcome to this video we're going to be adding other aliases this one's gonna be another quick one this is another useful one that I use for grub in the pot so we can see what's running so it can run run P which essentially just tells us what's on a pot so if I just do a quick update of the source and we do run P and we've got to do kolonko sass the syntax and fortunately we can see what's running on that particular part very useful if you might kill that so now if you want to kill that you could do kill six eight two four eight I'm not gonna kill access to server web server that I've got ruined currently but that's how you check what is currently running on any part and all you got to do is just change the port number at the end so again run P and then just give the pot to the alias really useful so in this video I just want to fill out the other aliases quite a bit we did accidentally remove the update earlier so I'm just going to put that back in there there's a ton of different aliases that I want to put put in this particular folder so we have used the ders V above and I'm not too sure if we're still using it I did show the you the commander but whenever put into an alias so let's put into an alias now I do also like being able to just see the back and forth and we can currently do that but I like to see that in my year laces I like to know it's there I can go back and check my configuration just so I can you know have a look and know what commands I can be running so those are some of the commands that I like to run you can also have if you want to if you've got for example vs code setup you can use code and that will allow you to set this up if not just putting like TextEdit there and that will also fire up your zero search configuration file you can also install stuff like history and make that show it is like a top 10 for example so we could put in top 10 but you got to make sure you got a history plug-in up here or what work and there's also a few of us so we've got stuff like the IP address we've got the Mac there we've got the run P we could use some the SSH one someone look for the SSH so if you SSH do not just go to your SSH though which is really as far as well so those are some of the of aliases I really like and again this entire file will be included at the end so in this video I want to give you a quick high-level overview of how functions work within is SH and almost any search and we're going to be running this in our Zed SHRC file it's quite a lot to set but anyhow generally the syntax is just function GC so is similar to what you see in JavaScript PHP obviously it's not GC but the function name so you do function and then we have a function name and you can pass in like arguments here which is really nice so I'm going to be showing you in the next video how you can use a pull request so if you have committed work and pushed it you want to create a pull request we can do that using a custom function that was given to me by a colleague at work and it's very very useful it's probably my favorite future and it's probably when I use a mouse archila and you don't always have to pass in a function name you could just do stuff like GPR grr for example and do that that works too but yeah it's I guess it's just personal preference but we'll look at how all this works and it should be very very useful so in this video we're going to be correcting the get pull request function you probably already saw this in the intro video the introduction to this series where I was doing a git pull request I'll just type GPR it's quite a complex function I wouldn't you know look into it too much just look at it from a high level and know that you'll get poor requests so let's go ahead let's do functions just do custom functions just for my OCD we'll put another hash there and pass that in and essentially what this does it says get me the URL the changes that are being pushed so I just go through it'll do all the good stuff and they'll just give me the branch name which is just amazing this was from a again a colleague called Mark I also his last name just because I know there's quite a few people may watch this don't be giving that away but I'll stop editing the commands as well so we can test off now so let's go ahead and run up there and then we can do top 10 and it can give the top 10 commands up a run which is really useful see all there's quite a lot of commands in there but yeah it's really really good it gives you the branch name gives you the github URL and just fire up a pull request immediately I know you got to do is click compare I'll leave the end of this video just showing how this works I have another video for that but this is definitely my favorite function and it's yeah it's a live server so yeah enjoy the rest of this video and I'll do a quick voice over of the function being applied to a get full request so yeah you can see here what's going on I'm just creating a new feature branch so we've got a new branch we Yakka something we commit it we won't commit just yet but we open this up in card we make a change we see is changed we go ahead and we're going to add this so we're gonna do TCA which does an adder and a commit and then we do a push when we do the push we type GPR which is coming born there is that's a good pull request function and is that simple to get Paul requests using the get pull request a function that we just created so this is a final video in a series I just want to give you the completed as aired SHRC configuration file you can go ahead and modify it I'd love to see what you've done we are terminal so you can press that in the community aspect of this particular series yeah I really appreciate you taking the time to actually watch all these videos if you have managed to get through them all and I'm sure that your workflow using a terminal will have increased tenfold now from gear to NPM - docker to yarn - using Z for extension for grabbing files and folders using your own plugins like CF you get rid of CF we don't need CF do needs here now we can just use Cloud Foundry and but yeah all these plugins come from the bundler and you know if you want to install other plugins like the syntax highlighting I've shown you how to do with that a few modifications here I've loaded in MVM because I like the MV m to be run enough the you know the the usual version or the the Bossip - version or whatever the package project I'm working on is using and especially globally - you want MPM to run globally and there's also different versions you can use if you've got NPM you can change the version which is really nice but anyways don't I got a - off topic this is the final video and this is the final file that you'll be able to download so hopefully this is really helpful and you should have an amazing terminal that increases your workflow tenfold so any questions do do drop them in the comments I'd love to see your questions and I'll be do my best to answer them but once again thanks for taking the time washi series it's really appreciated and hopefully I'll see you in a future series bye for now you
Info
Channel: Karl Hadwen
Views: 127,010
Rating: undefined out of 5
Keywords: oh my zsh, iterm, iterm2, oh my zsh plugins, web developer, front-end developer, junior developer, zsh, zsh vs bash, shell, linux, oh my zsh mac, oh my zsh mac setup, oh my zsh mac terminal, zsh vs bash vs fish, oh-my-zsh, terminal, codingphase, iterm2 customization, iterm2 vs terminal, becoming a zsh power user, beginner to advanced zsh, z shell (software), learn to code, iterm tutorials, zsh tutorials, command line, web developer career, zsh mac
Id: MSPu-lYF-A8
Channel Id: undefined
Length: 82min 30sec (4950 seconds)
Published: Sat Jul 13 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.