In the end, trying to remember everything would be silly and largely a waste. But memorizing those things that are common (but not daily) pain points would probably be an improvement over not. OTOH, I'm not going to quantify my time sufficiently to be able to provide clear evidence that it really speeds up my work.
What you know is a Turing-complete subset with all the platform escape hatches you need, so you're able to get your stuff working.
Something like grep can easily meet the mark.
The XKCD comic you're thinking of is much more general^: https://xkcd.com/1205/
^ and not too helpful here because it assumes you know how much time something saves/costs - which isn't obvious for spaced repetition because the entire point is to dynamically adjust the timing & number of repetitions over the long run.