couchbase-shell icon indicating copy to clipboard operation
couchbase-shell copied to clipboard

Improve UX around handling query strings

Open chvck opened this issue 3 years ago • 4 comments

ahh, I found out my issue...it might be a bit of an edge case but I could imagine something similar being common enough and leading to someone suspecting that multi-line queries don't work: I first tested a query with: analytics "select 1" When I confirmed that worked, I used the up arrow to bring that line back, then I deleted the select 1 bit (leaving the " " ) Then I copied a multi-line query from the query workbench and tried to paste it in between the " ". This failed...it attempted to execute each line separately

semi-related...I tried running an analytics query without " " and it failed as expected, but the analytics -h doesn't say that the statement needs to be between quotes. It might be obvious (certainly I know that it is) but someone just blindly copying the query from somewhere might not realise it. Could we a) state in the help that quotes are required or better yet, b) automatically fill in quotes on the command line?

chvck avatar Dec 07 '21 16:12 chvck

@chvck, what do we need for v1.0.0 here? do you think (b) is possible?

ingenthr avatar Jan 17 '22 21:01 ingenthr

@RekhaDS and I talked a bit further about this and we think it could be skipped for v1.0.0. good to have if easy.

ingenthr avatar Jan 17 '22 21:01 ingenthr

Part a of the second paragraph is easy enough. The rest I imagine is very non-trivial if even possible. That's going to be at the nushell level.

chvck avatar Jan 18 '22 18:01 chvck

Let's state that the quotes are required, then move this to 1.0.1

ingenthr avatar Jan 19 '22 16:01 ingenthr