In the script asciiview, the switch from "for name in $filenames;" to "echo $filenames|while read name;" breaks keyboard input from the user when aview is running. Also the way the patch processes multiple filenames is broken, e.g. when calling: asciiview file1 file2 file3, the filenames variable stores the file list as file1file2file3. Reproducible: Always Steps to Reproduce: 1. run: asciiview filename 2. run: asciivew file1 file2 file3 Actual Results: When running asciiview on one file, user input is ignored until exiting with ^C. When running "asciiview file1 file2 file3" you get: file1file2file3 could not be opended Expected Results: aview keyboard commands should be interpreted when running asciiview multiple file names should remain separate tokens.
Created attachment 260953 [details, diff] Fixed filename spaces patch
Created attachment 260955 [details, diff] tmp_creation patch to work with the fixed filename spaces patch
Created attachment 260957 [details, diff] patch to fix the keyboard commands from stdin problem
Created attachment 260958 [details] ebuild to apply the above patches in the correct order
I've taken a stab at fixing the asciiview script. I switched the filename-spaces patch from trying to use nulls and IFS voodoo to using newlines for the "while read" loop and also added some quotes that seem to have been forgotten in the original patch. It now works with multiple filenames, even with spaces in them. I've also added code to save stdin before the while loop and redirect stdin during to the aview command. This fixes the problem where it won't listen to the keyboard commands.
media-gfx/aview-1.3.0_rc1-r2 has been committed to the portage tree.