Ping. On Tue, 19 Jun 2018 at 16:04, Pavel Labath <lab...@google.com> wrote: > > A test? > > It looks like it should be possible to test this in a similar way to > other CommandCompletion tests > (unittests/Interpreter/TestCompletion.cpp). > On Mon, 18 Jun 2018 at 21:16, Raphael Isemann via lldb-commits > <lldb-commits@lists.llvm.org> wrote: > > > > Author: teemperor > > Date: Mon Jun 18 13:11:38 2018 > > New Revision: 334978 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=334978&view=rev > > Log: > > Fixed file completion for paths that start with '~'. > > > > We didn't add the remaining path behind the '~' to the completion string, > > causing it to just complete directories inside the user home directory. This > > patch just adds the directory of the remaining path if there is one. > > > > Fixes rdar://problem/40147002 > > > > Modified: > > lldb/trunk/source/Commands/CommandCompletions.cpp > > > > Modified: lldb/trunk/source/Commands/CommandCompletions.cpp > > URL: > > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandCompletions.cpp?rev=334978&r1=334977&r2=334978&view=diff > > ============================================================================== > > --- lldb/trunk/source/Commands/CommandCompletions.cpp (original) > > +++ lldb/trunk/source/Commands/CommandCompletions.cpp Mon Jun 18 13:11:38 > > 2018 > > @@ -164,6 +164,12 @@ static int DiskFilesOrDirectories(const > > // search in the fully resolved directory, but CompletionBuffer keeps > > the > > // unmodified form that the user typed. > > Storage = Resolved; > > + llvm::StringRef RemainderDir = path::parent_path(Remainder.str()); > > + if (!RemainderDir.empty()) { > > + // Append the remaining path to the resolved directory. > > + Storage.append(path::get_separator()); > > + Storage.append(RemainderDir); > > + } > > SearchDir = Storage; > > } else { > > SearchDir = path::parent_path(CompletionBuffer); > > > > > > _______________________________________________ > > lldb-commits mailing list > > lldb-commits@lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r334978 - Fixed file completion for paths that start with '~'.
Pavel Labath via lldb-commits Wed, 27 Jun 2018 07:15:39 -0700
- Re: [Lldb-commits] [lldb] r334978 - Fixed... Pavel Labath via lldb-commits
- Re: [Lldb-commits] [lldb] r334978 - ... Raphael Isemann via lldb-commits