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

Add parser for flatpak and flatpak update #104

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

Commits on Sep 6, 2023

  1. Allow parsers that don’t handle commands yet

    Parsers serve two purposes:
    
    1. They determine whether or not a command executes its arguments.
    2. They determine which parts of a command’s arguments are other
       commands that get executed.
    
    Before this change, parsers would have to do both, or else you would get
    an AttributeError. Now, you can create a partial parser that can confirm
    that a specific invocation doesn’t run any of its arguments but can’t
    handle invocations that do run their arguments.
    
    Specifically, this change is in preparation for adding a parser for
    flatpak. flatpak has 43 built-in subcommands, some of which are able to
    execute their arguments. I don’t want to bother adding a parser that
    supports all 43 of those. I want to add a parser that supports a single
    subcommand, and that subcommand can’t run its arguments.
    Jayman2000 committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    2730784 View commit details
    Browse the repository at this point in the history
  2. Add parser for flatpak and flatpak update

    This parser doesn’t cover all of flatpak’s subcommands because I don’t
    use all of flatpak’s subcommands in my own scripts.
    
    I created this script in order to help me test out this change:
    <https://gist.github.com/Jayman2000/35a6db532e1fd718d2039c36bb25ed89>
    Jayman2000 committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    2b0b5fd View commit details
    Browse the repository at this point in the history