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

WIP: Default parsing event command #252

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

keis
Copy link
Member

@keis keis commented Apr 8, 2016

Sadly breaking small things all over the place. But imo we should eventually push everything into using the default split logic of core and em respectively.

  • split quoted fixes
  • refactor em to not pass around formatted commands

@@ -498,6 +498,8 @@ split_quoted (const gchar *src, const gboolean unquote)
} else if (isspace (*p) && !ctx_double_quote && !ctx_single_quote) {
/* Argument separator. */
/* FIXME: Is "a b" three arguments? */
for (; isspace(*(p + 1)); ++p);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, a while loop would look better, IMO.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's going to look a bit derpy anyway because I need it to stop AT the last space and not one past it.

@mathstuf
Copy link
Member

mathstuf commented Apr 8, 2016

It might be worthwhile to have something like uzbl-core --parse "$command" which outputs how it parses out a command. Also, this is going to need backwards compat info in the README when the time comes.

@mathstuf mathstuf changed the title Default parsing event command WIP: Default parsing event command Apr 8, 2016
@keis
Copy link
Member Author

keis commented Apr 8, 2016

yeah. I think it's unavoidable that is going to break stuff. Could be worth changing some other commands at the same time (like set) while at it.

@keis keis force-pushed the default-parsing-event-command branch from 23adbb9 to 1b81618 Compare April 16, 2016 10:34
@keis
Copy link
Member Author

keis commented Apr 16, 2016

Trying this out a bit and my gut feeling is that it will be hard to do without changing every command at once. I'll try to split some small changes out of this that can be merged without breaking stuff.

@keis keis force-pushed the default-parsing-event-command branch from 1b81618 to 8a9068f Compare April 23, 2016 12:00
@keis keis mentioned this pull request Apr 23, 2016
This allows us to send the data as quoted strings rather than pass them
through raw which has the side effect of dropping a level of escapes due
to the earlier pass done in uzbl-core.

Update bind and on_event plugins to use already quoted arguments.

Ref uzbl#251
@keis keis force-pushed the default-parsing-event-command branch from 8a9068f to 07ec48c Compare August 1, 2016 10:42
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

Successfully merging this pull request may close these issues.

None yet

2 participants