[ 
https://issues.apache.org/jira/browse/TINKERPOP-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15926734#comment-15926734
 ] 

stephen mallette commented on TINKERPOP-1604:
---------------------------------------------

[~xytxytxyt]  I never noticed this one for some reason - I don't think we can 
hack {{evaluated()}} that way. It is a member of {{groovy.lang.Script}} and 
which is for evaluating groovy scripts with out the context of the console 
itself which owns the commands like {{:remote}}. 

so - first of all, is this issue still relevant? if it is, could you explain 
why you might want this feature over the {{:load}} command which seems to do 
what you want (i think). Given this script:

{code}
:remote connect tinkerpop.server conf/remote.yaml
:> 1+1
{code}

I can use {{:load}} as follows:

{code}
gremlin> :l add.groovy
==>Configured localhost/127.0.0.1:8182
==>2
gremlin> 
{code}

> Let evaluate() handle : commands e.g. :remote connect
> -----------------------------------------------------
>
>                 Key: TINKERPOP-1604
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1604
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: console
>    Affects Versions: 3.2.3
>            Reporter: Xian Yi Teng
>
> {code}
> ~/apache-tinkerpop-gremlin-console-3.2.3$ cat ../remote_connect.groovy 
> :remote connect tinkerpop.server 
> apache-tinkerpop-gremlin-console-3.2.3/conf/remote.yaml
> println 1+1
> ~/apache-tinkerpop-gremlin-console-3.2.3$ bin/gremlin.sh
>          \,,,/
>          (o o)
> -----oOOo-(3)-oOOo-----
> plugin activated: tinkerpop.server
> plugin activated: tinkerpop.utilities
> plugin activated: tinkerpop.tinkergraph
> gremlin> evaluate(new File('../remote_connect.groovy'))
> /home/automaton/remote_connect.groovy: 1: unexpected token: : @ line 1, 
> column 1.
>    :remote connect tinkerpop.server 
> apache-tinkerpop-gremlin-console-3.2.3/conf/remote.yaml
>    ^
> 1 error
> Type ':help' or ':h' for help.
> Display stack trace? [yN]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to