Portably generate config for any shell