Add support for '#' into graql shell


Please can you add support for commands starting with a ‘#’ in the shell, it just wants to ignore them, like it does when they’re in the file and you use the -f to process the file.

My use case is that I’m refining the ontology and I have comments in the file and I’m copy and pasting the lines from the file to test them and its a pain having to select the multiple blocks in order to avoid selecting the lines starting with a #!

Sorry to be really pedantic, but its a really simple tweak that would make my life a little bit easier!




Hi Steve,

I will add your feedback to the feature requests, but be aware that this is not a trivial change. The problem is that when you are reading files you actually want to skip the comments, so you are asking to change the behaviour of the GRAQL shell depending on contexts which are not clear cut. For this reason, although it might happen in the future, I cannot give you a definite timeline.

In the meanwhile, I suggest you use a text editor with columnar selections. I personally use (and many in the team do) Sublime 3. We are also developing a syntax highlighter for it, so it will definitely make your life easier.



Hi Miko,

Sorry, I thought (in my ignorance) it would be simple from the point of view that if the command entered starts with # you simply ignore the line.

My primary language is PHP, so I use PHPStorm, but do use Sublime for other stuff so can easily make use of the highlighter when you have one :slight_smile:



Sorry, maybe I misunderstood the question in the first place: the GRAQL shell should ignore the line starting with #. Can you tell me step by step what do you do and what happens?


Pretty simple, here’s my terminal output…

Grakn  Copyright (C) 2016  Grakn Labs Limited
This is free software, and you are welcome to redistribute it
under certain conditions; type 'license' for details.
>>> # this is a comment
syntax error at line 1:
# this is a comment
no viable alternative at input '<EOF>'

i.e just start a line with a # and press enter, it treats it as a command

  • Unless comments are prefixed with a different character? # work in files, I presumed it was the same in the shell?


HI Steve,

Thanks for reporting this. It’s a bug - like you say, it should be ignored.

We’ve already fixed the issue. You can expect to see the fix in the next release, or the one after!




Cool, if only all bugs were that easy to fix!

Nice one.