Fterm: A terminal emulator library for qt-fortran

Because if we are writing GUIs in Fortran, they need terminals, right?

This library is a pure-Fortran (OK, plus three lines of C code) terminal emulator and widget for qt-fortran, allowing you to include a terminal in your Fortran GUI application.

Mostly AI-written. Interestingly, I initially told it to use as little C as possible. But it ended up writing a lot of C code. After some back and forth, it turns out that almost all of it can, in fact, be written in Fortran. What is left are two variadic functions (ioctl and fcntl) and one macro errno, neither of which can be used with ISO C Binding.

2 Likes

Nice!

For Windows, port this shell to Fortran: GitHub - prefix-dev/shell: The ultimate cross-platform, bash-like shell · GitHub, actually on all platforms. I use it on macOS and Windows.

That takes care of all the basic utilities (included in the shell). I’ll get you the Fortran compiler in Fortran eventually. And that should do it I think?