split lists up so only commands that work in given window autocomplete