[jira] Commented: (GSHELL-20) `set foo=bar` does not work as expected
[ https://issues.apache.org/jira/browse/GSHELL-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550683 ] Jason Warner commented on GSHELL-20: Are we deciding to forgo this band-aid and put our hopes in a more fleshed out parser? `set foo=bar` does not work as expected - Key: GSHELL-20 URL: https://issues.apache.org/jira/browse/GSHELL-20 Project: GShell Issue Type: Bug Security Level: public(Regular issues) Components: Commands, Core Affects Versions: 0.0.1 Reporter: Jason Dillon Assignee: Jason Warner Priority: Critical Fix For: 1.0-alpha-2 Attachments: GShell-20.patch, GShell-20SingleQuote.patch Due to the way parsing happens, this line: {noformat} set foo=bar {noformat} Ends up calling the command with 2 arguments: foo= and bar, which is not what the command expects, which is one argument of: foo=bar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (GSHELL-20) `set foo=bar` does not work as expected
[ https://issues.apache.org/jira/browse/GSHELL-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546177 ] Jason Dillon commented on GSHELL-20: I basically just tossed together this grammar with my somewhat limited knowledge and experience with JavaCC. I'd really like to be able to lean on the parser to generate a more complex AST tree which can handle more of these language subtitles , but that is pushing the limit of hoops I can personally make JavaCC (or another like Antlr) jump through. Would really be nice if the universe handed us a motivated folk (or two) who where uber-savvy with JavaCC (or Antlr3) to build more complicated AST trees... Anyways, I know this part of the system is lacking, which is why I had hacked around it before, like using Jexl to handle the ${...} bits and some more specific post processing (like what is done in {{set}}) to handle (somewhat poorly) what the feeble parser isn't doing for us. This is definitely one of the weak parts of the system right now. I really would like to get a parser which can take most any BASH-like syntax and make sense of it. That is the ultimate goal IMO... complete BASH syntax compatibility (or really, ZSH since I think its got some extra nice bits). I will test this patch in the next day or so... though you know its just a bandaid na? What really needs to be done is to make the parser aware of this stuff, then maybe create a visitor to build a simple version of the tree elements suitable for handing to the executing visitor. The intermediate could handle things like: {noformat} echo foobar {noformat} and reduce that to simple this to pass to commands for execution: {noformat} echo foobar {noformat} Or something like that. Maybe I can coax one of the Antlr gurus on the Groovy team to lean a hand with this. But if you, or anyone else who reads JIRA comments, knows of someone and they are interested, I'd really love to haver some expert help with this part of GShell. `set foo=bar` does not work as expected - Key: GSHELL-20 URL: https://issues.apache.org/jira/browse/GSHELL-20 Project: GShell Issue Type: Bug Security Level: public(Regular issues) Components: Commands, Core Affects Versions: 0.0.1 Reporter: Jason Dillon Assignee: Jason Warner Priority: Critical Fix For: 1.0-alpha-2 Attachments: GShell-20.patch Due to the way parsing happens, this line: {noformat} set foo=bar {noformat} Ends up calling the command with 2 arguments: foo= and bar, which is not what the command expects, which is one argument of: foo=bar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (GSHELL-20) `set foo=bar` does not work as expected
[ https://issues.apache.org/jira/browse/GSHELL-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546517 ] Jason Warner commented on GSHELL-20: I do indeed realize that this is just a bandaid. If we can get the parser to handle this all without the post-processing, that would be fantastic. I don't know anywhere near enough about JavaCC to accomplish that myself, though. I thought that, given the hopes and dreams of a gshell release, it would be better to have something than nothing in regards to this jira. `set foo=bar` does not work as expected - Key: GSHELL-20 URL: https://issues.apache.org/jira/browse/GSHELL-20 Project: GShell Issue Type: Bug Security Level: public(Regular issues) Components: Commands, Core Affects Versions: 0.0.1 Reporter: Jason Dillon Assignee: Jason Warner Priority: Critical Fix For: 1.0-alpha-2 Attachments: GShell-20.patch Due to the way parsing happens, this line: {noformat} set foo=bar {noformat} Ends up calling the command with 2 arguments: foo= and bar, which is not what the command expects, which is one argument of: foo=bar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (GSHELL-20) `set foo=bar` does not work as expected
[ https://issues.apache.org/jira/browse/GSHELL-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546519 ] Jason Dillon commented on GSHELL-20: Yup and that is the right thing to do :-) Hopefully I can get a release ready in the next week, or ready to vote at least. Anyways, no worries, was not meaning to be critical to you, just was babbling about things as usual. I appreciate your help for sure :-) `set foo=bar` does not work as expected - Key: GSHELL-20 URL: https://issues.apache.org/jira/browse/GSHELL-20 Project: GShell Issue Type: Bug Security Level: public(Regular issues) Components: Commands, Core Affects Versions: 0.0.1 Reporter: Jason Dillon Assignee: Jason Warner Priority: Critical Fix For: 1.0-alpha-2 Attachments: GShell-20.patch Due to the way parsing happens, this line: {noformat} set foo=bar {noformat} Ends up calling the command with 2 arguments: foo= and bar, which is not what the command expects, which is one argument of: foo=bar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (GSHELL-20) `set foo=bar` does not work as expected
[ https://issues.apache.org/jira/browse/GSHELL-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546538 ] Jason Dillon commented on GSHELL-20: This seems to work okay for: {noformat} set foo=bar {noformat} As it sets {{foo}} to {{bar}}, but this does not work: {noformat} set foo='bar' {noformat} It sets {{foo}} to _empty_ and {{bar}} to {{true}}... :-( `set foo=bar` does not work as expected - Key: GSHELL-20 URL: https://issues.apache.org/jira/browse/GSHELL-20 Project: GShell Issue Type: Bug Security Level: public(Regular issues) Components: Commands, Core Affects Versions: 0.0.1 Reporter: Jason Dillon Assignee: Jason Warner Priority: Critical Fix For: 1.0-alpha-2 Attachments: GShell-20.patch Due to the way parsing happens, this line: {noformat} set foo=bar {noformat} Ends up calling the command with 2 arguments: foo= and bar, which is not what the command expects, which is one argument of: foo=bar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (GSHELL-20) `set foo=bar` does not work as expected
[ https://issues.apache.org/jira/browse/GSHELL-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546544 ] Jason Warner commented on GSHELL-20: That is actually somewhat expected behavior. I didn't realize that single quotes should be parsed the same as double quotes. Should double and single quotes be working in the same manner? I was working on the jira in a literal sense. Was there more outside of what was described that was in the scope of the jira? `set foo=bar` does not work as expected - Key: GSHELL-20 URL: https://issues.apache.org/jira/browse/GSHELL-20 Project: GShell Issue Type: Bug Security Level: public(Regular issues) Components: Commands, Core Affects Versions: 0.0.1 Reporter: Jason Dillon Assignee: Jason Warner Priority: Critical Fix For: 1.0-alpha-2 Attachments: GShell-20.patch Due to the way parsing happens, this line: {noformat} set foo=bar {noformat} Ends up calling the command with 2 arguments: foo= and bar, which is not what the command expects, which is one argument of: foo=bar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (GSHELL-20) `set foo=bar` does not work as expected
[ https://issues.apache.org/jira/browse/GSHELL-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546543 ] Jason Warner commented on GSHELL-20: That is actually somewhat expected behavior. I didn't realize that single quotes should be parsed the same as double quotes. Should double and single quotes be working in the same manner? I was working on the jira in a literal sense. Was there more outside of what was described that was in the scope of the jira? `set foo=bar` does not work as expected - Key: GSHELL-20 URL: https://issues.apache.org/jira/browse/GSHELL-20 Project: GShell Issue Type: Bug Security Level: public(Regular issues) Components: Commands, Core Affects Versions: 0.0.1 Reporter: Jason Dillon Assignee: Jason Warner Priority: Critical Fix For: 1.0-alpha-2 Attachments: GShell-20.patch Due to the way parsing happens, this line: {noformat} set foo=bar {noformat} Ends up calling the command with 2 arguments: foo= and bar, which is not what the command expects, which is one argument of: foo=bar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (GSHELL-20) `set foo=bar` does not work as expected
[ https://issues.apache.org/jira/browse/GSHELL-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546547 ] Jason Dillon commented on GSHELL-20: Yes and no ;-) The expansion of strings happens internally with a wee bandaid using jexl in the executing visitor. So by the time it gets to the command and '' are basically the same. And really there should be no quotes on anything anymore at this point. Basically, it should work like BASH does eventually... one day... ;-) Anyways, this is not a big deal, there are larger fish to fry feel like cooking? `set foo=bar` does not work as expected - Key: GSHELL-20 URL: https://issues.apache.org/jira/browse/GSHELL-20 Project: GShell Issue Type: Bug Security Level: public(Regular issues) Components: Commands, Core Affects Versions: 0.0.1 Reporter: Jason Dillon Assignee: Jason Warner Priority: Critical Fix For: 1.0-alpha-2 Attachments: GShell-20.patch Due to the way parsing happens, this line: {noformat} set foo=bar {noformat} Ends up calling the command with 2 arguments: foo= and bar, which is not what the command expects, which is one argument of: foo=bar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (GSHELL-20) `set foo=bar` does not work as expected
[ https://issues.apache.org/jira/browse/GSHELL-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546585 ] Jason Dillon commented on GSHELL-20: I spent some time today and worked more on a POC using Antlr3 to implement a BASH grammar... still need some work, and well, I think I'll probably end up using JavaCC, unless I suddenly gain +10 comprehension of Antlr3 and succumb to the byte cost of the additional jars... dunno yet. I think the next release will probably see a brand new parser (maybe crippled) but abale to parse BASH-ish syntax `set foo=bar` does not work as expected - Key: GSHELL-20 URL: https://issues.apache.org/jira/browse/GSHELL-20 Project: GShell Issue Type: Bug Security Level: public(Regular issues) Components: Commands, Core Affects Versions: 0.0.1 Reporter: Jason Dillon Assignee: Jason Warner Priority: Critical Fix For: 1.0-alpha-2 Attachments: GShell-20.patch, GShell-20SingleQuote.patch Due to the way parsing happens, this line: {noformat} set foo=bar {noformat} Ends up calling the command with 2 arguments: foo= and bar, which is not what the command expects, which is one argument of: foo=bar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (GSHELL-20) `set foo=bar` does not work as expected
[ https://issues.apache.org/jira/browse/GSHELL-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541149 ] Jason Dillon commented on GSHELL-20: This is probably going to require some changes to the grammar to parse things correctly. `set foo=bar` does not work as expected - Key: GSHELL-20 URL: https://issues.apache.org/jira/browse/GSHELL-20 Project: GShell Issue Type: Bug Security Level: public(Regular issues) Components: Commands, Core Affects Versions: 0.0.1 Reporter: Jason Dillon Assignee: Jason Warner Priority: Critical Fix For: 1.0-alpha-1 Due to the way parsing happens, this line: {noformat} set foo=bar {noformat} Ends up calling the command with 2 arguments: foo= and bar, which is not what the command expects, which is one argument of: foo=bar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.