History or Hash autodetection