probcomp / bayeslite

BayesDB on SQLite. A Bayesian database table for querying the probable implications of data as easily as SQL databases query the data itself.
http://probcomp.csail.mit.edu/software/bayesdb
Apache License 2.0
921 stars 63 forks source link

New lines with dot command not possible #87

Open fsaad opened 9 years ago

fsaad commented 9 years ago

If I write .show followed by incomplete query, the terminal takes the current input rather than prompt for new lines.

bayeslite> .show 'SELECT * FROM <newline>
Traceback (most recent call last):
  File "/home/fsaad/pcp/bayeslite/build/lib.linux-x86_64-2.7/bayeslite/shell/hook.py", line 57, in __call__
    return self.func(*args)
  File "/home/fsaad/Documents/pcp/bdbcontrib/bdbcontrib/contrib_plot.py", line 218, in pairplot
    args = parser.parse_args(shlex.split(argin))
  File "/usr/lib/python2.7/shlex.py", line 279, in split
    return list(lex)
  File "/usr/lib/python2.7/shlex.py", line 269, in next
    token = self.get_token()
  File "/usr/lib/python2.7/shlex.py", line 96, in get_token
    raw = self.read_token()
  File "/usr/lib/python2.7/shlex.py", line 172, in read_token
    raise ValueError, "No closing quotation"
ValueError: No closing quotation
No closing quotation

Desired behavior should be

bayeslite> .show 'SELECT * FROM <newline>
   ...> table WHERE X < 10
   ...> ORDERBY  blash;' --colorby z
tibbetts commented 9 years ago

@ev46 just hit this.