 Okay, let's look at, I'm going to do more of a tutorial on this in the future, but I'm going to show you a script that I recently wrote. So if you remember, let's go here to my web browser, I'll go to filmsbychrist.com. As I mentioned earlier today, that I like, anytime you have a list, especially once it gets over 20, you're definitely over 50, I like when you have lists that you can filter, and I like that they can filter as you're typing, instead of having to type a little bit, hit Enter and see what happens. So an example on my website here, I can type an in-map and right away it gives me a response of three videos, if I was to delete that, I can type in bash, obviously I got a lot of bash videos, or just trying to think camera, so there's some videos with cameras. So I like that, can we do that in bash? Using just bash scripts, I don't know if N Cursors has anything like this, but this is just doing a simple little bash script. This can obviously be improved upon, but it's a simple little script I wrote that kind of allows you to do that. So let me move into my downloads folder, and I have a photos folder here, photos lowercase p, and here, if I list this out, you can see I have 25 or so images, and then I have the script here. Let me just show you how this works. I'm going to run my script, filter.sh, and automatically I have it set up to list JPEGs that are in the current directory. And now I can start typing. So let's say I want to find a picture with my daughter's name in the title. I can type in e, and you can see it filters down the list a little bit. I hit m, and it's filter it down more, and then I can type in br, and when I do underscore, it filters a little bit more, and when I hit one, it opens the picture automatically. So again, let's do that again with something else, I'll type in bas. We have two images here, underscore two, and there's my son sleeping inside a laundry basket. So it filters down the list as you're typing. As you can see, again, if I type in s, you can see up here, it says there's eight results for s, and it is doing it case insensitive, which is something like this you probably want. Then I'm going to hit o, and you can see it filters again, and now it says there's three, and then at this point I can start typing south. Oh, you see, and I want to show you. If I type something wrong, so again, like if I hit e here, and there's no results, it says zero results for this, it pauses for a second, and it says, you know, no entries found for, and then it's clearing the list, and it brings you back to the last thing you typed that was a valid entry. So now I can continue typing. One thing that would be nice for me to add to this is like to be able to narrow down the list and then select from the list, and I actually have some batch script code that does that, similar to, you know, like a list that you have in endcurses, but not using endcurses just because. So in reality using endcurses is a great thing, if you're not familiar with it. And to have just a list, now here I'm filtering a list which I like, but also if you just have minimum of type, and it jumps to something in the list, that's great too, and I'm pretty sure endcurses does that, so if I have a long list I can start typing them, it jumps to those things in the list, but usually those things in a lot of cases only, like I can start typing south, it would bring up these ones that have south at the beginning, but I couldn't start typing border, so for example, if I just close the script and reopen it, I can start typing bor, and you see it doesn't matter that it's at the beginning or the end, it's finding what I'm typing inside the list, so I go like this, underscore, I hit E, there was one left, and it opens up that picture. So again, it's not perfect, but it's a nice little script, very simple, and it does something that I find useful without having to use, I don't want to say external tools, because it is using grep, but it's using core tools, let's just look at the code again, I'm going to probably do a video on this more in depth in the future, but just looking at this, let's just bring this down a little bit, so you can see I have this set up to look for JPEG, so automatically it creates a variable called L, puts the list of JPEGs in there, we have some variables, you can change what viewer you want, and clears the screen, lists out the list, and then down here, it's going to start a loop down here, where it's constantly looking for input from the user, but it's looking for one character at a time and adding it to the I variable, we'll recall the prompt, which is this here, and basically it's going to grep through the list, give you a count, and give you results, and then depending on whether the output is blank, meaning there were no results, it will tell you there's no results, clearing the list, reset the variable to the last note, working input, sleep for a second, then bring up this prompt again, and then now at any point, if the count, we get down to where there's one thing in the list, at that point, it's going to clear the screen, let us know that it found something, and then open the image viewer, and then after that, once you close the image viewer, it brings up the prompt again, and starts to cycle over again, so it's a very simple little script, obviously could be approved upon, but something you can throw into a script if you want to have filter, and so again, you can have hundreds or thousands of things, and as you're typing, it do it again, it be nice if, you know, if I typed in IMG here, okay, so be really easy for me to go underscore BI, and it opens up the bike one, but if I do IMG underscore two, it's like I still have all these, and I have to type in 2018, zero three, it narrows it a little bit more, I can go two, okay, there's a little more, four, underscore zero, eight, two, and then when I hit, if I hit seven now, it will open the picture, but if I hit nine, I've got to go a little bit further, two, so I'm pretty much typing out the full name, so it's beneficial, but it'd be great if I can figure out a way to incorporate this to where you can filter the list, and then also, you know, use your arrow keys up and down to choose from that list, and I just found a bug in my program, I don't know, it's just, it's, I thought it was caught in the loop there. I hit the up arrow and it detected that as a key, and it cleared it out, and I thought it did it twice, so I thought there was going to continuously do that. Anyway, again, very simple, but this is the sort of thing where I look at as far as my programming, let me say this, my program here, my script probably could be more efficient, it's probably not the best way to do this, but it works, but even if my program isn't right, I would consider this good design, because, again, in my opinion, if you have a list, once you get over 20 or especially over 50 things in the list, you should be able to jump to things in the list, or at the very least, or preferably, filter a list as you're typing, because to me, that's just, you know, the best way I'm typing, and I can see things as I'm typing, I don't have to type part of it, hit enter, see what the results are. So to me, that's just part of good design. I don't know if you guys feel the same way, definitely let me know what you guys think. Again, if you just have 10, 15 things in the list, it's not a huge deal, but the larger the list gets, the ability to filter it as you're typing becomes more and more necessary, if you ask me. And I hate programs. You know, when it comes to forms and stuff in applications or websites, you can have a drop-down list, try to think of someplace, you know, most drop-down lists by default, you can hit a letter and jump to, you know, the A's in the list, or the B's in the list, or you can type in BA, and it'll jump to the BA in the list, but it doesn't filter lots of times by the, you know, center of the word. Certainly, you know, some do, but by default, usually drop-down lists aren't like that. And that's why I prefer filters. So again, my website here with this, or, well, first of all, let's also mention this. If you want this code, it's up on my pay spin. Here's the address right here. So you can type that in now if you'd like. Or, as always, if you come to my website, Filmsbychrist.com, click on software. And if you're watching this future, that website design might be different, but I should still have this here under software. Notes brings up my notes here. And again, here's a filter list. I can type something like filter. And it filtered down the list. And this is a little bit smarter of a filter. I can hit space and type in BASH, and it'll bring up all files that say filter and bash inside that code. And then we have two things on the list. And obviously, it's this first one that we want. It's the code that we're looking at today. So again, if you want to give my little code a try, give it, you know, see if you can improve it maybe. If you do improve it, definitely let me know. It's under a GPL license. I would love if you shared the code back. I should probably put it up on, again, as I said earlier today, I'm using Pastebin for a lot of my simple little scripts that aren't bigger projects. I really much would prefer to use GIST, and I really should start using GIST. But I wrote my little filter list there to back up and pull and create this database based on my Pastebin. I just haven't had time or felt like rewriting my code to work with GIST. And yeah, that's why I'm still using Pastebin. So it's a little bit harder for you to submit changes. But if you do make a change, let me know. You know, send it to me and maybe we'll set up something on GIST or Github or something like that depending on how big the project gets, probably just GIST. Anyway, again, films.christ.com will afford you to the most current version. Software, notes, in here. You can start typing. So again, like Nmap, here's my notes on Nmap. You know, you get the title and you can click on it and it should bring you to Pastebin. You can see the code. If I was typing something like Arduino. Here's some Arduino scripts. Again, these are my like single page short little scripts or notes. They're not larger projects in which case they'd be up my Github. So that's the same thing if you were to go to my if you click scripts here. This is example codes, mostly HTML and JavaScript stuff that will run in my web browser so you can see them there. A lot of those are projects that are based on pulled from my Github page. So here's my Github. You know, I have 143 repositories and here you can go through things like my bin here has a lot of this kind of my bin is kind of kind of like my Pastebin. It's there there a bunch of short little scripts under different categories and then I have bigger projects as well. My Vim setup, which also actually has my Tmux setup. Simple little install script there for that. My configs, I don't remember what some of this is. Also my Fluxbox and my i3 configs, which I need to update because I've made some changes to my i3, which I've been using for a couple of months now. Barcode scanner here is actually hit barcode scanner. This is probably to pull YouTube. Oh okay, yeah this was example code I was creating for somebody to to use barcode scanner to so I could scan a music CD and it will bring up the playlist on YouTube and probably yeah using YouTube DL to pull the address and stuff like that. Anyway I got a lot of projects out so that's just kind of what I'm pointing out here. Some of these are like little projects I started and never finished and some are just ones I'm constantly working on but they're all they're all accessible through my website again. Filmsbychrist.com software, you can go to my larger projects, my notes or see example code running online in the web browser. Yeah so let's see what is next.