What is the command to get the command history in the console window of the Atom editor?
I am using the Atom editor with the package uber-juno
installed as Julia's IDE. I would like to know if there is a way to get the entire list of commands entered in the console window, instead of going through it using the up arrow or down arrow.
As with linux, we can type history
into the terminal to get the entire history of the commands entered into the terminal. Please let me know if there is a way to achieve this.
Thank.
source to share
While there is no julia function that does this, you can easily enter shell mode (as Gnimuk hinted) from the julia REPL by pressing ;
before entering the command. This will convert your julia promt from julia>
to shell>
.
Then you can run the following command:
less .julia_history
Since this also contains timestamps and other information, if you just want to use commands, you can output lines starting with a comment #
:
grep "^#" .julia_history -v | less
This pretty much has the same effect as history
in bash / matlab / etc.
It also has the added benefit that you can use all the functions provided less
(including search) right from your terminal.
PS: and after you've typed this time, you won't need to memorize it, because next time you can call it easily by typing
;grep
and pressing the up arrow: p (although before the shell / grepping command, these are pretty simple commands)
source to share