[GitHub] tinkerpop pull request #385: TINKERPOP-1285 added multi-line line number sup...

2016-08-27 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/tinkerpop/pull/385


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop pull request #385: TINKERPOP-1285 added multi-line line number sup...

2016-08-24 Thread spmallette
Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/385#discussion_r76053089
  
--- Diff: 
gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
 ---
@@ -191,7 +192,18 @@ class Console {
 groovy.setResultHook(handleResultShowNothing)
 }
 
-private def handlePrompt = { interactive ? STANDARD_INPUT_PROMPT : "" }
+private def handlePrompt = { 
+if (interactive) {
+int lineNo = groovy.buffers.current().size()
+if (lineNo > 0 ) {
+return 
lineNo.toString().padLeft(STANDARD_INPUT_PROMPT_PAD, 
'0').padRight(STANDARD_INPUT_PROMPT.length()-2, ' ') + "> "
--- End diff --

if it's easier to evaluate as merged, then i think we might want to 
complete the vote here for this work, as we already have three votes on the 
other PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop pull request #385: TINKERPOP-1285 added multi-line line number sup...

2016-08-24 Thread pluradj
Github user pluradj commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/385#discussion_r76052809
  
--- Diff: 
gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
 ---
@@ -191,7 +192,18 @@ class Console {
 groovy.setResultHook(handleResultShowNothing)
 }
 
-private def handlePrompt = { interactive ? STANDARD_INPUT_PROMPT : "" }
+private def handlePrompt = { 
+if (interactive) {
+int lineNo = groovy.buffers.current().size()
+if (lineNo > 0 ) {
+return 
lineNo.toString().padLeft(STANDARD_INPUT_PROMPT_PAD, 
'0').padRight(STANDARD_INPUT_PROMPT.length()-2, ' ') + "> "
--- End diff --

Yeah, it might be better to merge the 2 PRs together. 
`STANDARD_INPUT_PROMPT.length()` is replaced by the `input.prompt` preference 
from the colorization PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop pull request #385: TINKERPOP-1285 added multi-line line number sup...

2016-08-18 Thread robertdale
GitHub user robertdale opened a pull request:

https://github.com/apache/tinkerpop/pull/385

TINKERPOP-1285 added multi-line line number support

Looks like:
```
gremlin> 
gremlin> 1 +
001   2 +
002   3 +
003   x
No such property: x for class: groovysh_evaluate
Display stack trace? [yN] 
003   4
==>10
```
Note that the line number remained the same for the correction.

Example from the jira ticket:
```
gremlin> script = """line1
001   line2
002   line3
003   ...
004   """
==>line1
line2
line3
...

gremlin> 
```

Multi-line query:
```
gremlin> 
gremlin> g.V().has(
001   'name',
002   'marko')
==>v[1]
gremlin> 
```

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/robertdale/tinkerpop TINKERPOP-1285

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tinkerpop/pull/385.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #385


commit 96537e40844731ad7efd0e513fac15b13dae16d7
Author: Robert Dale 
Date:   2016-08-18T19:18:31Z

added multi-line line number support




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---