Function untar, swap. History search backward & forward