[repl] Refactor autocomplete to reduce nesting
[repl] Refactor autocomplete to reduce nesting

adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython