<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<br><div><div>On Apr 7, 2011, at 11:10 PM, Michael Brown wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Thursday 07 Apr 2011 18:41:02 Greg Jednaszewski wrote:<br><blockquote type="cite"><blockquote type="cite">There is already a viable way to force a trailing space on "echo":<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> set spc:hex 20<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> echo -n Prompt:${spc} && read answer<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'll test this out. I think that will work for me.<br></blockquote><br>I just thought of an even simpler way:<br><br> echo -n Prompt: ${} && read answer<br><br>I have updated <a href="http://ipxe.org/cmd/read">http://ipxe.org/cmd/read</a> to include this hint.<br><br><blockquote type="cite"><blockquote type="cite">For "equals": I think that "iseq" or "isequal" would probably be a better<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">name, for consistency with "isset". What do you think?<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">That sounds good. I'll go with iseq and resubmit with the echo -n space<br></blockquote><blockquote type="cite"> change taken out.<br></blockquote><br>Thanks! Two other points regarding the actual code:<br><br>+ return strcmp ( argv[1], argv[2] );<br><br>argv[1] and argv[2] should be argv[optind] and argv[optind+1], for consistency <br>with other commands (and in case parse_options() ever allows a generic option <br>that (unlike "--help") doesn't prevent the command from executing).<br><br>.exec() methods return a status code, so you need something like<br><br> return ( ( strcmp ( argv[optind], argv[optind+1] ) == 0 ) ? 0 : -ERANGE );<br><br>ERANGE isn't a particularly great choice; take your pick oin f errors listed in <br>include/errno.h if you think there's a better one.<br></div></blockquote></div><br><div>I made these changes in <a href="https://github.com/gjednaszewski/ipxe/commit/82aba048ca1364c1f980d9ad4f445ed5c331e8dc">https://github.com/gjednaszewski/ipxe/commit/82aba048ca1364c1f980d9ad4f445ed5c331e8dc</a></div><div><br></div><div>I can submit a new pull request, or some other method, whatever works best for you. I'm pretty new to github and git in general, so I don't know what all the options are.</div><div><br></div><div>Thanks,</div><div>Greg</div><div><br></div></body></html>