Pash-Project/Pash — pull request #169 by sburnicki (2013-10-20 15:23:18+00:00)
Title: Getline Integration for non-Windows systems

Only the windows console offers convenient functions to use Pash (edit command in line, use history, abort, etc). On other systems, all of these actions, for example the arrows keys, caused invisible characters to appear an cause parsing errors.

To get a more usable user experience, I integrated getline.cs (https://github.com/mono/mono/blob/master/mcs/tools/csharp/getline.cs) for non-Windows systems.

It can be controlled with the newly introduced PASHUseUnixLikeConsole variable. Not setting it (default) will lead to getline.cs on all non-Windows systems. Setting it, e.g. in config.ps1, it will control whether getline.cs will be used or not.

I needed to change the Prompt() function to not directly execute the prompt() function of config.ps1, but to gather the result and write it manually to the output. Otherwise the integration of getlione.cs wouldn't have been possible.
Also the PashVariable class with the constant variable names is public now, in order to be usable from all over the project.

Unfortunately, no proper tests for these changes came into my mind, yet. This is because the changes concern FullHost and direct user interaction on the console. If you have an idea of how a proper test should look like, please tell me and I will implement it and update the pull request.

Thanks,
Stefan