Modern shells support command-line editing for efficient recall and correction of commands. Command-line editing is more efficient than using the shell's history mechanism. Shells like KornShell, Bash ...
Save the file by hitting Ctrl+O, then quit nano with Ctrl+X. Close the terminal window. (You can type the command exit to do ...