c[ode]clap»Forums
44 posts
Capturing user input
Edited by joe513 on Reason: Initial post
While debugging a command line program is it possible to capture user input when using something like fgets() or getchar() ?


And on a different topic I noticed that configuration paths that have a space in the name will not work on Linux (Manjaro), easy to get around but worth noting.
spx
148 posts / 1 project
Capturing user input
I guess it should work similar to the stdout handle. For an initial implementation I probably can just get the one for stdin and provide a text input next to the output area to send data to that stream. Hopefully that should just work.

You mean spaces when passing something on the command line? Will look into that.
44 posts
Capturing user input
spx
You mean spaces when passing something on the command line? Will look into that.


Actually have not tried it from the command line yet. I first seen it when trying to drop an executable into the debugger for automatic configuration. In this case nothing happens, no configuration is made. If I manually create a configuration with a file name that has a space it will start but cannot find any of the files. For both of these cases I had a file on my desktop called "New Folder". After changing to "NewFolder" both scenarios worked as expected.
spx
148 posts / 1 project
Capturing user input
So far I have found 2 places where spaces are problematic.
  • On Linux when using drag and drop
  • On Windows when launching from the command line


Both, as well as the user input for command line applications, should be fixed in the next build.