Closed gadenbuie closed 4 years ago
shortcuts <- roxygen2::parse_file("~/.config/.shrtcts.R")
# Shortcut Title
roxygen2::block_get_tag_value(shortcuts[[1]], "title")
#> [1] "Restart RStudio"
# Shortcut Description
roxygen2::block_get_tag_value(shortcuts[[1]], "description")
#> NULL
# Shortcut ID
roxygen2::block_get_tag_value(shortcuts[[1]], "name")
#> [1] "5"
# Is Shortcut Interactive?
roxygen2::block_has_tags(shortcuts[[1]], "export")
#> [1] TRUE
Kind of an out-there idea that might just actually work. In place of the
.shrtcts.yaml
, shortcuts could instead be stored in an.R
script with the settings pulled from roxygen2 tags.Example:
becomes
or
becomes