Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow newline in prompt #186

Open
apstndb opened this issue Sep 6, 2024 · 0 comments
Open

Allow newline in prompt #186

apstndb opened this issue Sep 6, 2024 · 0 comments

Comments

@apstndb
Copy link
Collaborator

apstndb commented Sep 6, 2024

Other interactive SQL tools (and interactive shells) allow to contain newlines in prompt, and it is used by some users.

Examples

I believe that allowing newlines helps both showing detail informations in prompt and short indentation in spanner-cli.

Expected behavior

prompt = "[\\p:\\i:\\d]\\n   > "

shows

[very-long-project-id:very-long-instance-id:very-long-database-id]
   >

and continuation prompt is aligned to the last line of the prompt

[very-long-project-id:very-long-instance-id:very-long-database-id]
   > SELECT *
  -> FROM Singers;

Related discussion #183 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant