[Lldb-commits] [lldb] r216626 - A quoted - is not the beginning of an option, and should not be completed as such. This was causing:
jingham at apple.com
Wed Aug 27 15:06:58 PDT 2014
Date: Wed Aug 27 17:06:58 2014
New Revision: 216626
A quoted - is not the beginning of an option, and should not be completed as such. This was causing:
(lldb) disassemble -n '-<TAB>
--- lldb/trunk/source/Interpreter/Args.cpp (original)
+++ lldb/trunk/source/Interpreter/Args.cpp Wed Aug 27 17:06:58 2014
@@ -1644,8 +1644,10 @@ Args::ParseArgsForCompletion
// Finally we have to handle the case where the cursor index points at a single "-". We want to mark that in
// the option_element_vector, but only if it is not after the "--". But it turns out that OptionParser::Parse just ignores
// an isolated "-". So we have to look it up by hand here. We only care if it is AT the cursor position.
+ // Note, a single quoted dash is not the same as a single dash...
if ((static_cast<int32_t>(dash_dash_pos) == -1 || cursor_index < dash_dash_pos)
+ && m_args_quote_char[cursor_index] == '\0'
&& strcmp (GetArgumentAtIndex(cursor_index), "-") == 0)
option_element_vector.push_back (OptionArgElement (OptionArgElement::eBareDash, cursor_index,
More information about the lldb-commits