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

tt connect #15

Closed
Tracked by #8
unera opened this issue Jul 28, 2021 · 4 comments · Fixed by #51
Closed
Tracked by #8

tt connect #15

unera opened this issue Jul 28, 2021 · 4 comments · Fixed by #51
Assignees

Comments

@unera
Copy link

unera commented Jul 28, 2021

SYNOPSIS

tt connect [url|instance_name]

DESCRIPTION

Connect to remote tarantool or tarantool instance (for local).

If there is only one local instance is present, You can use tt connect without additional arguments.

OPTIONS

  • -x lua|sql - request format
  • -I - non interactive mode (example: echo _G| tt connect -I)
  • -i file - pass the file (in non-interactive mode. See tarantoolctl eval)
@LeonidVas
Copy link
Collaborator

AFAIU after a conversation with @unera , as a result of this task, we want to create a module that will accumulate the functionality of tarantoolctl connect, tarantoolctl enter and tarantoolctl eval.
For example:
tarantoolctl connect URI correspond tt connect URI
tarantoolctl enter INSTANCE correspond tt connect INSTANCE
tarantoolctl eval INSTANCE FILE correspond tt connect INSTANCE -e FILE

And one more thing - maybe a better name for the module is console or something else.

@Mons
Copy link

Mons commented Nov 23, 2021

-I is optional in case of STDIN redirection.
In that case isatty for stdin would be false and there will be no need in -I

@unera
Copy link
Author

unera commented Nov 24, 2021

Yes, the module should check isatty, but the module should have -I, too.

For example git log checks isatty, but from time to time the mechanism is inconvenient. From time to time I use git log -n 1|cat to disable pager.

@Mons
Copy link

Mons commented Nov 24, 2021

Also, I don't like the mix of upper and lowercase options with different meanings.
It's a common cause for getopt with upper/lower case to have opposite meanings, like:
-i - interactive, -I - non-interactive
It's better to find different letters and use only lowercase, if possible

@Totktonada Totktonada added 5sp and removed incoming labels Nov 29, 2021
@LeonidVas LeonidVas self-assigned this Jan 27, 2022
LeonidVas added a commit that referenced this issue Apr 18, 2022
The minimum required part of the connect module from the
cartridge-cli (https://github.com/tarantool/cartridge-cli) was copied
without any changes.

Part of #15
LeonidVas added a commit that referenced this issue Apr 18, 2022
As far as the module has been copied from cartridge-cli without any
changes, this patch has the following targets:
* add a description for public methods
* remove unneeded code
* squash similar part of code

Part of #15
LeonidVas added a commit that referenced this issue Apr 18, 2022
The patch adds `eval` functionality to the connect module.
Now, if code has been passed in by a command, it will be
executed on the instance and the result (in YAML format) will
be returned to `stdout`.

Part of #15
LeonidVas added a commit that referenced this issue Apr 18, 2022
The patch adds a workaround for the bug "Terminal does
not display command after go-prompt exit"
(c-bata/go-prompt#228).

Part of #15
LeonidVas added a commit that referenced this issue Apr 18, 2022
The minimum required part of the connect module from the
cartridge-cli (https://github.com/tarantool/cartridge-cli) was copied
without any changes.

Part of #15
LeonidVas added a commit that referenced this issue Apr 18, 2022
As far as the module has been copied from cartridge-cli without any
changes, this patch has the following targets:
* add a description for public methods
* remove unneeded code
* squash similar part of code

Part of #15
LeonidVas added a commit that referenced this issue Apr 18, 2022
The patch adds `eval` functionality to the connect module.
Now, if code has been passed in by a command, it will be
executed on the instance and the result (in YAML format) will
be returned to `stdout`.

Part of #15
LeonidVas added a commit that referenced this issue Apr 18, 2022
The patch adds a workaround for the bug "Terminal does
not display command after go-prompt exit"
(c-bata/go-prompt#228).

Part of #15
LeonidVas added a commit that referenced this issue Apr 19, 2022
The minimum required part of the connect module from the
cartridge-cli (https://github.com/tarantool/cartridge-cli) was copied
without any changes.

Part of #15
LeonidVas added a commit that referenced this issue Apr 19, 2022
As far as the module has been copied from cartridge-cli without any
changes, this patch has the following targets:
* add a description for public methods
* remove unneeded code
* squash similar part of code

Part of #15
LeonidVas added a commit that referenced this issue Apr 19, 2022
The patch adds `eval` functionality to the connect module.
Now, if code has been passed in by a command, it will be
executed on the instance and the result (in YAML format) will
be returned to `stdout`.

Part of #15
LeonidVas added a commit that referenced this issue Apr 19, 2022
The patch adds a workaround for the bug "Terminal does
not display command after go-prompt exit"
(c-bata/go-prompt#228).

Part of #15
@Totktonada Totktonada linked a pull request Apr 19, 2022 that will close this issue
LeonidVas added a commit that referenced this issue Apr 20, 2022
The minimum required part of the connect module from the
cartridge-cli (https://github.com/tarantool/cartridge-cli) was copied
without any changes.

Part of #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
As far as the module has been copied from cartridge-cli without any
changes, this patch has the following targets:
* add a description for public methods
* remove unneeded code
* squash similar part of code

Part of #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
The patch adds `eval` functionality to the connect module.
Now, if code has been passed in by a command, it will be
executed on the instance and the result (in YAML format) will
be returned to `stdout`.

Part of #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
The patch adds a workaround for the bug "Terminal does
not display command after go-prompt exit"
(c-bata/go-prompt#228).

Part of #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
LeonidVas added a commit that referenced this issue Apr 20, 2022
The patch adds information about `tt connect` module
to CHANGELOG and README.

Follow-up #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
As far as the module has been copied from cartridge-cli without any
changes, this patch has the following targets:
* add a description for public methods
* remove unneeded code
* squash similar part of code

Part of #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
The patch adds `eval` functionality to the connect module.
Now, if code has been passed in by a command, it will be
executed on the instance and the result (in YAML format) will
be returned to `stdout`.

Part of #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
The patch adds a workaround for the bug "Terminal does
not display command after go-prompt exit"
(c-bata/go-prompt#228).

Part of #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
LeonidVas added a commit that referenced this issue Apr 20, 2022
The patch adds information about `tt connect` module
to CHANGELOG and README.

Follow-up #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
The minimum required part of the connect module from the
cartridge-cli (https://github.com/tarantool/cartridge-cli) was copied
without any changes.

Part of #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
As far as the module has been copied from cartridge-cli without any
changes, this patch has the following targets:
* add a description for public methods
* remove unneeded code
* squash similar part of code

Part of #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
The patch adds `eval` functionality to the connect module.
Now, if code has been passed in by a command, it will be
executed on the instance and the result (in YAML format) will
be returned to `stdout`.

Part of #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
The patch adds a workaround for the bug "Terminal does
not display command after go-prompt exit"
(c-bata/go-prompt#228).

Part of #15
LeonidVas added a commit that referenced this issue Apr 20, 2022
LeonidVas added a commit that referenced this issue Apr 20, 2022
The patch adds information about `tt connect` module
to CHANGELOG and README.

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

Successfully merging a pull request may close this issue.

4 participants