[ale] php-cli text input

David Hamm ale at spinnerdog.com
Thu Nov 17 16:07:41 EST 2011


Hi,

In php-cli, I'm looking for a way to allow a terminal user to edit a file name 
before saving it.  The program should prompt the user like this.

Save file as:  yourfile.txt

And the user should be able to edit the name of the file.

I've looked at readline() but readline doesn't let you set an initial/default 
value.  I've also tried to find a way to push the default value into the 
keyboard buffer but no luck.  

Does anyone have any ideas?


More information about the Ale mailing list