Apply readline editing to arbitrary programs