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

consider execute field #63

Closed
jmbarbone opened this issue May 8, 2023 · 0 comments · Fixed by #65
Closed

consider execute field #63

jmbarbone opened this issue May 8, 2023 · 0 comments · Fixed by #65
Assignees
Labels
enhancement New feature or request

Comments

@jmbarbone
Copy link
Owner

jmbarbone commented May 8, 2023

Function that is to be run with the value of the parameter

scribe_help_arg <- function() {
  new_arg(
    aliases = "--help",
    action = "flag",
    default = FALSE,
    n = 0,
    info = "prints this and quietly exits",
    options = list(no = FALSE),
    stop = "hard",
    execute = function() {
      if (isTRUE(self$values$help)) {
        self$help()
        exit()
        return(invisible(self))
      }
    }
  )
}

May need a warning "For expert usage only". May be able to redefine an execution field after looping through each each/parsed value.

@jmbarbone jmbarbone added the enhancement New feature or request label May 8, 2023
@jmbarbone jmbarbone self-assigned this May 8, 2023
jmbarbone added a commit that referenced this issue May 14, 2023
not exactly sure what I did to make them fail
jmbarbone added a commit that referenced this issue May 14, 2023
jmbarbone added a commit that referenced this issue May 14, 2023
jmbarbone added a commit that referenced this issue May 14, 2023
jmbarbone added a commit that referenced this issue May 14, 2023
jmbarbone added a commit that referenced this issue May 15, 2023
jmbarbone added a commit that referenced this issue May 15, 2023
allow many parameters, pass more meaningfuly
jmbarbone added a commit that referenced this issue May 15, 2023
jmbarbone added a commit that referenced this issue May 15, 2023
jmbarbone added a commit that referenced this issue May 15, 2023
jmbarbone added a commit that referenced this issue May 15, 2023
realized I had removed some important line(s) somewhere
jmbarbone added a commit that referenced this issue May 15, 2023
@jmbarbone jmbarbone mentioned this issue May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant