Identify terminal client type
Only keep 10k history entries + don't create files for empty histories