you need to read the history file then do the listing, for the script is running in a sub process which does not have history.