So I was thinking of it today, my program requires user input from a list and I got a thought from Linux how you press tab it auto completes to whatever command it is closest too.
My thought was something like this
Yeah shit syntax and such, but idgaf. I am just stuck how I would set up like a Linux auto-completion feature. Without criticizing me to much how would I do this or can you point me somewhere?
My thought was something like this
Code
#include <iostream>
#include <string>
using std::string;
using std::cout;
using std::cin;
int main()
{
string sInput;
cout << "Enter the input";
cin >> sInput;
/*If it is an exact input as in it fits the following if statements it goes and does that.*/
/*However, if it doesn't it loads PDCurses or a similar library that allows "console" manipulation so it lists them then I can press up or down to choose the closest one judging by what the first few characters are. */
}Yeah shit syntax and such, but idgaf. I am just stuck how I would set up like a Linux auto-completion feature. Without criticizing me to much how would I do this or can you point me somewhere?


![[Image: 3.gif]](https://i.ibb.co/zH0GQ122/3.gif)