Skip to content

[FEATURE] Substitution improvements #299

Description

@sciurius

Script name

quickcommands

Script authors

@LockeBirdsey

Discussion

Currently, when the autocompletionHook is called, all availableCommands are re-inited. This involves many date calculations and substitutions.

I'd like to suggest to instead build the availableCommands list and then perform the substitutions on this (much smaller) list only.

Also, instead of merely substituting YYYY and such, I'd suggest to use a template-like syntax, e.g. {YYYY}. This makes substitutions more efficient and allows date/time values in user defined command as well.

If you are interested I'm willing to prepare a PR.

Suggestion

Several scripts have a hard coded formatDate function. It may be worth to centralize this function or use a strftime library.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions