You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by spmallette <gi...@git.apache.org> on 2018/01/25 13:20:30 UTC

[GitHub] tinkerpop pull request #791: TINKERPOP-1879 Fixed gremlin.sh handling of = i...

GitHub user spmallette opened a pull request:

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

    TINKERPOP-1879 Fixed gremlin.sh handling of = in flags

    https://issues.apache.org/jira/browse/TINKERPOP-1879
    
    Builds with `mvn clean install -pl gremlin-console -DskipIntegrationTests=false`
    
    VOTE +1

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

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1879

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

    https://github.com/apache/tinkerpop/pull/791.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 #791
    
----
commit 352d06e5a9bcbd34e6082a8e2092584cf3a5ea41
Author: Stephen Mallette <sp...@...>
Date:   2018-01-25T13:17:52Z

    TINKERPOP-1879 Fixed gremlin.sh handling of = in flags

----


---

[GitHub] tinkerpop issue #791: TINKERPOP-1879 Fixed gremlin.sh handling of = in flags

Posted by robertdale <gi...@git.apache.org>.
Github user robertdale commented on the issue:

    https://github.com/apache/tinkerpop/pull/791
  
    Those tests pass?  It doesn't seem to work for me on the cli.


---

[GitHub] tinkerpop issue #791: TINKERPOP-1879 Fixed gremlin.sh handling of = in flags

Posted by spmallette <gi...@git.apache.org>.
Github user spmallette commented on the issue:

    https://github.com/apache/tinkerpop/pull/791
  
    If i filter out the short options and someone does `-e=x.groovy` (or `-i=`) then it hangs the load of the console (which was the original problem i wanted to solve). I guess to properly handle this, i'd need to invalidate the short options when they contain an "=" and just print an error message. should i do that?


---

[GitHub] tinkerpop issue #791: TINKERPOP-1879 Fixed gremlin.sh handling of = in flags

Posted by spmallette <gi...@git.apache.org>.
Github user spmallette commented on the issue:

    https://github.com/apache/tinkerpop/pull/791
  
    true - it just sorta worked that way i guess. i didn't go out of my way to disallow it.  should i change it?


---

[GitHub] tinkerpop issue #791: TINKERPOP-1879 Fixed gremlin.sh handling of = in flags

Posted by spmallette <gi...@git.apache.org>.
Github user spmallette commented on the issue:

    https://github.com/apache/tinkerpop/pull/791
  
    ok - i think i have it right now:
    
    ```text
    $ cat x.groovy
    println "test"
    $ bin/gremlin.sh -e x.groovy
    test
    $ bin/gremlin.sh -e=x.groovy
    Gremlin file not found at [=x.groovy].
    $ bin/gremlin.sh -i=x.groovy
    
             \,,,/
             (o o)
    -----oOOo-(3)-oOOo-----
    plugin activated: tinkerpop.server
    plugin activated: tinkerpop.utilities
    plugin activated: tinkerpop.tinkergraph
    Gremlin file not found at [=x.groovy].
    gremlin> :x
    $ bin/gremlin.sh -i x.groovy
    
             \,,,/
             (o o)
    -----oOOo-(3)-oOOo-----
    plugin activated: tinkerpop.server
    plugin activated: tinkerpop.utilities
    plugin activated: tinkerpop.tinkergraph
    test
    gremlin> :x
    ```
    
    Existing console integration tests all pass. Good?


---

[GitHub] tinkerpop issue #791: TINKERPOP-1879 Fixed gremlin.sh handling of = in flags

Posted by dkuppitz <gi...@git.apache.org>.
Github user dkuppitz commented on the issue:

    https://github.com/apache/tinkerpop/pull/791
  
    Yea, I think that would be better. Looks like an easy change, you'd just feed `normalizeArgs` with the long options only.


---

[GitHub] tinkerpop issue #791: TINKERPOP-1879 Fixed gremlin.sh handling of = in flags

Posted by spmallette <gi...@git.apache.org>.
Github user spmallette commented on the issue:

    https://github.com/apache/tinkerpop/pull/791
  
    
    What were you trying? seems to work for me:
    
    ```text
    $ cat x.groovy
    println "123"
    $ bin/gremlin.sh -e x.groovy
    123
    $ bin/gremlin.sh -e=x.groovy
    123
    $ bin/gremlin.sh -i=x.groovy
    
             \,,,/
             (o o)
    -----oOOo-(3)-oOOo-----
    plugin activated: tinkerpop.server
    plugin activated: tinkerpop.utilities
    plugin activated: tinkerpop.tinkergraph
    123
    gremlin> :x
    $ bin/gremlin.sh --interactive=x.groovy
    
             \,,,/
             (o o)
    -----oOOo-(3)-oOOo-----
    plugin activated: tinkerpop.server
    plugin activated: tinkerpop.utilities
    plugin activated: tinkerpop.tinkergraph
    123
    gremlin> :x
    $ bin/gremlin.sh --execute=x.groovy
    123
    $ bin/gremlin.sh --execute x.groovy
    123
    ```


---

[GitHub] tinkerpop issue #791: TINKERPOP-1879 Fixed gremlin.sh handling of = in flags

Posted by dkuppitz <gi...@git.apache.org>.
Github user dkuppitz commented on the issue:

    https://github.com/apache/tinkerpop/pull/791
  
    VOTE: +1


---

[GitHub] tinkerpop pull request #791: TINKERPOP-1879 Fixed gremlin.sh handling of = i...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

[GitHub] tinkerpop issue #791: TINKERPOP-1879 Fixed gremlin.sh handling of = in flags

Posted by robertdale <gi...@git.apache.org>.
Github user robertdale commented on the issue:

    https://github.com/apache/tinkerpop/pull/791
  
    Yeah, ok, apparently I never actually switched branches.  Time to get some coffee....
    VOTE +1



---

[GitHub] tinkerpop issue #791: TINKERPOP-1879 Fixed gremlin.sh handling of = in flags

Posted by dkuppitz <gi...@git.apache.org>.
Github user dkuppitz commented on the issue:

    https://github.com/apache/tinkerpop/pull/791
  
    Hmm, although it's functional, it looks kinda weird. The common patterns are:
    
    * `-s` and `-s arg` for short options
    * `--long`, `--long arg` and `--long="arg"` for long options
    
    I've never seen short options allowing the equals sign.


---