flatiron/node-prompt — Issue #24: Extraneous space appended to delimiter
Author: jkeyes
Created: 2011-12-06 23:40:14+00:00
State: open

Hi,

See [line 194](https://github.com/flatiron/node-prompt/blob/882343fac9c269bd3af1ac4ba79a610411cb1951/lib/prompt.js#L194) of prompt.js:

191 prompt.getInput = function (prop, callback) {
192 var name = prop.message || prop.name || prop,
193 propName = prop.name || prop,
194 delim = prompt.delimiter + ' ',
195 raw = [prompt.message, delim + name.grey, delim.grey],
196 read = prop.hidden ? prompt.readLineHidden : prompt.readLine,
197 length, msg;

If I set prompt.message and prompt.delimiter to '' (empty string) I would like the property message to begin in the first column of the terminal. As it stands, it will be indented by a single space.

The README states:

The basic structure of a prompt is this:
prompt.message + prompt.delimiter + property.message + prompt.delimiter;

which as you can see isn't true.

Thanks,
-John