Fix #9
This commit is contained in:
parent
b28590234d
commit
35b890e657
12
client.d
12
client.d
|
@ -27,6 +27,7 @@ import std.algorithm;
|
||||||
import std.path;
|
import std.path;
|
||||||
import std.file;
|
import std.file;
|
||||||
import std.conv;
|
import std.conv;
|
||||||
|
import std.string;
|
||||||
//version(Windows)
|
//version(Windows)
|
||||||
//{
|
//{
|
||||||
// import core.runtime;
|
// import core.runtime;
|
||||||
|
@ -86,6 +87,7 @@ int /*_*/main(string[] args)
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
stderr.writeln(e.msg);
|
stderr.writeln(e.msg);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (help)
|
if (help)
|
||||||
|
@ -165,20 +167,22 @@ int /*_*/main(string[] args)
|
||||||
if (response.completions.length > 0)
|
if (response.completions.length > 0)
|
||||||
{
|
{
|
||||||
writeln(response.completionType);
|
writeln(response.completionType);
|
||||||
|
auto app = appender!(string[])();
|
||||||
if (response.completionType == CompletionType.identifiers)
|
if (response.completionType == CompletionType.identifiers)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < response.completions.length; i++)
|
for (size_t i = 0; i < response.completions.length; i++)
|
||||||
{
|
app.put(format("%s\t%s", response.completions[i], response.completionKinds[i]));
|
||||||
writefln("%s\t%s", response.completions[i], response.completionKinds[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach (completion; response.completions)
|
foreach (completion; response.completions)
|
||||||
{
|
{
|
||||||
writeln(completion);
|
app.put(completion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Deduplicate overloaded methods
|
||||||
|
foreach (line; app.data.sort.uniq)
|
||||||
|
writeln(line);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue