<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - color prompt causes wrong indentation of cmds (with `settings set prompt "\033[31m(lldb)\033[0m "`)"
href="https://bugs.llvm.org/show_bug.cgi?id=40200">40200</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>color prompt causes wrong indentation of cmds (with `settings set prompt "\033[31m(lldb)\033[0m "`)
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>thelastmammoth@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>~/.lldbinit:
```
settings set prompt "\033[31m(lldb)\033[0m "
```
this "almost" works, it it shows a colored prompt (red), however, it causes
wrong indentation between prompt and typed commands.
```
(lldb) platform shell pwd
/Users/timothee/git_clone/llvm/tools/lldb
(lldb)
```
I suspect that the bug is likely caused by line editor naively counting the
number of chars in given prompt, instead of number of printable chars.
Could we allow (as workaround) user to specify actual width (and user is
responsible for specifying the correct amount of printable characters)
Where would that be in code?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>