[lldb/Commands] Fix disk completion from root directory
authorMed Ismail Bennani <ismail@bennani.ma>
Mon, 5 Jun 2023 20:19:44 +0000 (13:19 -0700)
committerMed Ismail Bennani <ismail@bennani.ma>
Tue, 6 Jun 2023 17:58:34 +0000 (10:58 -0700)
commite8966125e2812f08bf0f548bf576981025d44cbd
treeee8b2cd38eee6ea6bb3ca714f7e26478943b38ec
parent3bc0baf9d43967d828e2d311f6c0863e79158f07
[lldb/Commands] Fix disk completion from root directory

This patch should fix path completion starting from the root directory.

To do so, this patch adds a special case when setting the search
directory when the completion buffer points to the root directory.

Differential Revision: https://reviews.llvm.org/D152013

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
lldb/source/Commands/CommandCompletions.cpp
lldb/test/API/functionalities/completion/TestCompletion.py