autodetect terminal command