Skip to content

Commit d35824f

Browse files
committed
improve selectOption formatting
1 parent 9aef2ec commit d35824f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/selectOption.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ module.exports.selectOption = async function selectOption(title, options) {
1616
lines.push(
1717
" " +
1818
(i === selection
19-
? cyan().bold("• [" + (i + 1) + "]")
20-
: gray(" [" + (i + 1) + "]")) +
21-
" " +
22-
options[i],
19+
? cyan().bold("• " + options[i])
20+
: gray("• ") + options[i]),
2321
)
2422
}
2523
lines.push("", "Use up/down arrow keys and hit [ENTER]")
@@ -32,6 +30,7 @@ module.exports.selectOption = async function selectOption(title, options) {
3230
if (key === "\r") {
3331
// enter!
3432
popKeyboardContext()
33+
logUpdate()
3534
resolve(selection)
3635
} else if (key === "\u001b[B") {
3736
// arrow down!

0 commit comments

Comments
 (0)