subshell is not interactive, thus, history inside a script doesn't work as intended...then, creating a function one