init settings in function to catch vars set later
normal psql if in a completion
remove some unused things