Remove trailing space
Append to the history file
Add aliases to prevent files from being mistakenly modified