Change --full to --extended
This commit is contained in:
parent
f384bc7c24
commit
ab529606a4
|
@ -136,7 +136,7 @@ tab character, followed by a completion kind
|
||||||
getPartByName f
|
getPartByName f
|
||||||
|
|
||||||
#### Extended output mode
|
#### Extended output mode
|
||||||
You can pass `--full` to dcd-client to get more information. Output will now be
|
You can pass `--extended` to dcd-client to get more information. Output will now be
|
||||||
escaped (newlines get escaped to `\n`, tabs get escaped to `\t`, backslash gets escaped to `\\`).
|
escaped (newlines get escaped to `\n`, tabs get escaped to `\t`, backslash gets escaped to `\\`).
|
||||||
|
|
||||||
Calltips are slightly different here because they first start with the function name instead of
|
Calltips are slightly different here because they first start with the function name instead of
|
||||||
|
@ -152,7 +152,7 @@ a tab separated format:
|
||||||
* symbol location: in which file (or `stdin`) & byte offset this symbol is defined. Separated with a space.
|
* symbol location: in which file (or `stdin`) & byte offset this symbol is defined. Separated with a space.
|
||||||
* documentation: escaped documentation string of this symbol
|
* documentation: escaped documentation string of this symbol
|
||||||
|
|
||||||
#### Example `--full` output
|
#### Example `--extended` output
|
||||||
identifiers
|
identifiers
|
||||||
libraryFunction f Tuple!long libraryFunction(string s, string s2) stdin 190 foobar
|
libraryFunction f Tuple!long libraryFunction(string s, string s2) stdin 190 foobar
|
||||||
libraryFunction f int* libraryFunction(string s) stdin 99 Hello\nWorld
|
libraryFunction f int* libraryFunction(string s) stdin 99 Hello\nWorld
|
||||||
|
|
|
@ -74,7 +74,7 @@ int main(string[] args)
|
||||||
"tcp", &useTCP, "socketFile", &socketFile,
|
"tcp", &useTCP, "socketFile", &socketFile,
|
||||||
"getIdentifier", &getIdentifier,
|
"getIdentifier", &getIdentifier,
|
||||||
"localUsage", &localUse, // TODO:remove this line in Nov. 2017
|
"localUsage", &localUse, // TODO:remove this line in Nov. 2017
|
||||||
"localUse|u", &localUse, "full|x", &fullOutput);
|
"localUse|u", &localUse, "extended|x", &fullOutput);
|
||||||
}
|
}
|
||||||
catch (ConvException e)
|
catch (ConvException e)
|
||||||
{
|
{
|
||||||
|
@ -289,7 +289,7 @@ Options:
|
||||||
Searches for all the uses of the symbol at the cursor location
|
Searches for all the uses of the symbol at the cursor location
|
||||||
in the given filename (or stdin).
|
in the given filename (or stdin).
|
||||||
|
|
||||||
--full | -x
|
--extended | -x
|
||||||
Includes more information with a slightly different format for
|
Includes more information with a slightly different format for
|
||||||
calltips when autocompleting.
|
calltips when autocompleting.
|
||||||
|
|
||||||
|
@ -366,17 +366,17 @@ void printLocationResponse(ref const AutocompleteResponse response)
|
||||||
writeln(makeTabSeparated(response.symbolFilePath, response.symbolLocation.to!string));
|
writeln(makeTabSeparated(response.symbolFilePath, response.symbolLocation.to!string));
|
||||||
}
|
}
|
||||||
|
|
||||||
void printCompletionResponse(ref const AutocompleteResponse response, bool full)
|
void printCompletionResponse(ref const AutocompleteResponse response, bool extended)
|
||||||
{
|
{
|
||||||
if (response.completions.length > 0)
|
if (response.completions.length > 0)
|
||||||
{
|
{
|
||||||
writeln(response.completionType);
|
writeln(response.completionType);
|
||||||
auto app = appender!(string[])();
|
auto app = appender!(string[])();
|
||||||
if (response.completionType == CompletionType.identifiers || full)
|
if (response.completionType == CompletionType.identifiers || extended)
|
||||||
{
|
{
|
||||||
foreach (ref completion; response.completions)
|
foreach (ref completion; response.completions)
|
||||||
{
|
{
|
||||||
if (full)
|
if (extended)
|
||||||
app.put(makeTabSeparated(
|
app.put(makeTabSeparated(
|
||||||
completion.identifier,
|
completion.identifier,
|
||||||
completion.kind == char.init ? "" : "" ~ completion.kind,
|
completion.kind == char.init ? "" : "" ~ completion.kind,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
../../bin/dcd-client $1 file.d --full -c32 > actual1.txt
|
../../bin/dcd-client $1 file.d --extended -c32 > actual1.txt
|
||||||
diff actual1.txt expected1.txt
|
diff actual1.txt expected1.txt
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
../../bin/dcd-client $1 --full file.d -c7 > actual1.txt
|
../../bin/dcd-client $1 --extended file.d -c7 > actual1.txt
|
||||||
|
|
||||||
minimumsize=100 # identifiers + the symbols without documentation + some margin
|
minimumsize=100 # identifiers + the symbols without documentation + some margin
|
||||||
actualsize=$(wc -c < "actual1.txt")
|
actualsize=$(wc -c < "actual1.txt")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
../../bin/dcd-client $1 file.d --full -c44 > actual1.txt
|
../../bin/dcd-client $1 file.d --extended -c44 > actual1.txt
|
||||||
diff actual1.txt expected1.txt
|
diff actual1.txt expected1.txt
|
||||||
|
|
Loading…
Reference in New Issue