From ab529606a425f8ada30f7778d6e5c2665fcd85bb Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Thu, 30 Nov 2017 23:15:31 +0100 Subject: [PATCH] Change --full to --extended --- README.md | 4 ++-- src/dcd/client/client.d | 10 +++++----- tests/tc059/run.sh | 2 +- tests/tc060/run.sh | 2 +- tests/tc061/run.sh | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a5e2646..476b556 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ tab character, followed by a completion kind getPartByName f #### 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 `\\`). 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. * documentation: escaped documentation string of this symbol -#### Example `--full` output +#### Example `--extended` output identifiers libraryFunction f Tuple!long libraryFunction(string s, string s2) stdin 190 foobar libraryFunction f int* libraryFunction(string s) stdin 99 Hello\nWorld diff --git a/src/dcd/client/client.d b/src/dcd/client/client.d index fa7e460..796e1d3 100644 --- a/src/dcd/client/client.d +++ b/src/dcd/client/client.d @@ -74,7 +74,7 @@ int main(string[] args) "tcp", &useTCP, "socketFile", &socketFile, "getIdentifier", &getIdentifier, "localUsage", &localUse, // TODO:remove this line in Nov. 2017 - "localUse|u", &localUse, "full|x", &fullOutput); + "localUse|u", &localUse, "extended|x", &fullOutput); } catch (ConvException e) { @@ -289,7 +289,7 @@ Options: Searches for all the uses of the symbol at the cursor location in the given filename (or stdin). - --full | -x + --extended | -x Includes more information with a slightly different format for calltips when autocompleting. @@ -366,17 +366,17 @@ void printLocationResponse(ref const AutocompleteResponse response) 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) { writeln(response.completionType); auto app = appender!(string[])(); - if (response.completionType == CompletionType.identifiers || full) + if (response.completionType == CompletionType.identifiers || extended) { foreach (ref completion; response.completions) { - if (full) + if (extended) app.put(makeTabSeparated( completion.identifier, completion.kind == char.init ? "" : "" ~ completion.kind, diff --git a/tests/tc059/run.sh b/tests/tc059/run.sh index d05cb47..8ee7555 100755 --- a/tests/tc059/run.sh +++ b/tests/tc059/run.sh @@ -1,5 +1,5 @@ set -e 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 --git a/tests/tc060/run.sh b/tests/tc060/run.sh index 3e60dbf..973e46c 100755 --- a/tests/tc060/run.sh +++ b/tests/tc060/run.sh @@ -1,7 +1,7 @@ set -e 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 actualsize=$(wc -c < "actual1.txt") diff --git a/tests/tc061/run.sh b/tests/tc061/run.sh index d821d46..e247475 100755 --- a/tests/tc061/run.sh +++ b/tests/tc061/run.sh @@ -1,5 +1,5 @@ set -e 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