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

proper shell parsing or something to not be confused by > and | #7

Closed
Dieterbe opened this issue Sep 30, 2014 · 6 comments
Closed

proper shell parsing or something to not be confused by > and | #7

Dieterbe opened this issue Sep 30, 2014 · 6 comments

Comments

@Dieterbe
Copy link
Owner

> and | are used in influx-cli to redirect to file, and pipe to an external command, just like a shell does.
the way this is currently parsed, is a bit clunky though, and bugs arise when people have bigger-then conditions in their query or | as part of a regex.
we need something more robust to separate the query/command from the redirect/pipe stuff.
while we're add it, it would be great if we could do something like cmd | grep | sed | whatever > bar.txt
to make stuff like this possible, we should probably look at shell libraries and such things.

@abh
Copy link

abh commented Dec 11, 2014

One work-around would be to have an option to disable the "shell redirect" features. I never use them and I often have to not use influx-cli because I can't have multiple "> conditions".

@abh
Copy link

abh commented Dec 11, 2014

Actually, better just remove those features. I don't understand the value. If I want to use the shell I should just run influx-cli from the shell and use my shell's features for those things.

@Dieterbe
Copy link
Owner Author

fair point, iam sometimes in the middle of a session when i want to use these features and it's annoying to go out, run a shell command and then go back in . but they are causing too much brokenness right now.. maybe we should use different characters as long as we don't have a proper parser

@abh
Copy link

abh commented Dec 11, 2014

I think the MySQL client uses the comment terminator (“;”, “\G”, etc) to specify output options like that.=

@Dieterbe
Copy link
Owner Author

aha that seems like a nice and simple fix

@Dieterbe
Copy link
Owner Author

now it's only activated on ; | and ; > :)

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

2 participants