Jump to content

How do I tab complete while doing console input in php?


lamper02

Recommended Posts

Hello everyone!  New LAMP convert here...

 

 

My goal is to write a php script that allows the user to input some text inside the console, but when they press the tab key I want to stop and maybe present a prompt of auto complete options, or if they press up goto their previous item in their history.  Similar to a shell.

 

I've tried fgetc and fgets, but neither flushes to STDIN until the user presses enter.  ncurses seems nice, but the PHP I'm stuck with doesn't seem to recognize its functions.  Any help?

 

Thanks!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.