window: Write command without path to the history file