A Fortran subroutine called redo(3f) may be used to give a line-mode command history to interactive programs.
git clone https://github.com/urbanjost/M_history.git
cd M_history/src
# change Makefile if not using one of the listed compilers
# for gfortran
make clean
make F90=gfortran gfortran
# for ifort
make clean
make F90=ifort ifort
# for nvfortran
make clean
make F90=nvfortran nvfortran
This will compile the M_history module and build the example program in the app/ sub-directory using the source file M_history_standalone.f90.
(registered at the fpm(1) registry )
Alternatively, download the github repository and build it with fpm ( as described at Fortran Package Manager )
git clone https://github.com/urbanjost/M_history.git
cd M_history
fpm build
fpm test
or just list it as a dependency in your fpm.toml project file.
[dependencies]
M_history = { git = "https://github.com/urbanjost/M_history.git" }