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.
Script name
quickcommands
Script authors
@LockeBirdsey
Discussion
Currently, when the
autocompletionHookis called, allavailableCommandsare re-inited. This involves many date calculations and substitutions.I'd like to suggest to instead build the
availableCommandslist and then perform the substitutions on this (much smaller) list only.Also, instead of merely substituting
YYYYand 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
formatDatefunction. It may be worth to centralize this function or use astrftimelibrary.