Adds a cache policy for the `gi` command completion function, i.e.
`_gitignoreio`. Previously, every completion call would request the list
endpoint of gitignore.io over the network, resulting in a delay between
pressing <Tab> and the autocomplete options showing up.
Since we don't expect the gitignore.io templates to change that
frequently, configured the cache policy to expire after 7 days.
Fixes#13736
Signed-off-by: Rishvic Pushpakaran <rishvic@gmail.com>
Deals with app error page, saving true error instead.
Upon app failure, Heroku returns HTML "Application Error" page.
Finding HTML page in .gitignore is confusing, so I replaced
`-s` with `-f` in curl calls, which cuts such output.
Replace instead of addition as no progress meter outputs either.
It is practically impossible to teach good programming style to students that have had prior exposure to BASIC. As potential programmers, they are mentally mutilated beyond hope of regeneration.
-- E. W. Dijkstra
Seems like this is more like the intended effect, splits arguments with commas
for proper gitignore.io api request.
Thanks for teaching me about custom compdef completions!
Updated with zsh join operator by Marc Cornellà
This commit completes previous efforts and standardizes both curl commands
into using silent mode and following redirects in case the URL changes
again in the future.