From the course: Practical GitHub Code Search
Using the search box and shortcuts - GitHub Tutorial
From the course: Practical GitHub Code Search
Using the search box and shortcuts
- [Instructor] Let's take a look at some of the features of the search box, as well as the shortcuts that are available. Search is available from every page on the site via a search box in the header. You can see that there is a "slash" in the box, which suggests that you can use the slash in your keyboard to get to the search box. And although it doesn't say so, you can also hit the "S" key, and of course, you can click on the search box. You can also use the command pallet to get to the search, which is "command+K" or "command+option+K" on a Mac, and "control+K" and "control+option+K" on a PC, although I think using the slash is a little bit easier and it seems to have better auto completion. Just have to mention that if you are ever looking for shortcuts in GitHub, you can also hit the question mark key to get a list. And then here you can see all of the shortcuts, plus even more down here in this link. You can also hit "Escape" to get out of any one of those dialogue boxes. The search box is context sensitive. So right now we are at just github.com and if I hit the slash, you'll notice that I can search for things and it gives you some hints down here. So I'm going to type in "React," and I'm going to hit return, and notice that it's going to look for "React" in github.com. So you can see that it lets you also filter by all these options here. However, I'm going to go now to my profile page, and I'm going to hit the slash, and you'll see that now it's auto filling the owner, because it knows that I am looking under my profile, so it automatically pre-fills that. And let's say that I am looking at a specific repository, so I'll click right here on "repositories," and I'll click on this podcast generator repository. And now I'm going to hit the slash and you'll notice that it's pre-filled where I am, so it's saying "repo," and then it's explaining that I am in planet of the web slash podcast generator. Now whenever you are searching, you can also use the arrow keys and the enter key to accept one of the options that you've selected. So I can search for "action dot YML" right here, by hitting return, and it's going to show me that file.