mirror of
https://github.com/sbopkg/sbopkg
synced 2025-01-13 20:01:13 +01:00
Mirror of https://github.com/sbopkg/sbopkg
69224bfd1c
All direct uses of the 'read' builtin are now close to the following format: possibly a block of statement text to the user output by whatever means are handiest then, if not an 'anykey' prompt, a loop which prompts and checks for valid input. The prompt is generally a concise line in the forms of read -p "(A)pples or (O)ranges?: " read -n1 -p "Press any key to continue: " Then a case statement handles the input in the format: A|a) apple_action ;; O|o) orange_action ;; *) unknown_response ;; Also misc minor changes such as modifying wording or option letters, changing linebreaks in case statements, etc. Beyond simple wording changes in the statement text, there was also: * remove_files(): removed the 'echo -e foo\n' which seemed unnecessary. * use_options(): added the SAVEDOPT and QUEUEOPT variables which are used in read's prompt to customize it to the nature of the actually possible choices and removed the 'else's we don't need to display. |
||
---|---|---|
src | ||
tools |