IBM / clai

Command Line Artificial Intelligence or CLAI is an open-sourced project from IBM Research aimed to bring the power of AI to the command line interface.
https://clai-home.mybluemix.net/
MIT License
476 stars 73 forks source link

Command crash when have parentheses #3

Open flipper83 opened 4 years ago

flipper83 commented 4 years ago

Describe the bug We have a bug when the command has parentheses. The problem is that we need to split the command by pipes to execute one to one with CLAI and the paraentheses broken the commands. It's really complex right now to fix because we need a lex analyzer :S

To Reproduce Steps to reproduce the behavior:

  1. Write command with parentheses (ls | grep hi) | grep .

Expected behavior process the command without break it.

shell and OS (please complete the following information):

twinstar26 commented 4 years ago

I think that using a simple recursive solution might resolve this issue. But for other purposes/future use/proofing if we need lex analyser, then only I think we should use lex analyser.

Your thoughts??