Here’s what I learned from starting to read the source code to fff - in particular, the main function.

fff is “a simple file manager written in Bash”. As I’m always on the lookout to learn more about Bash, that description got my attention immediately. It’s a small but perfectly formed offering, complete with man page and even a Makefile for installation. And the file manager executable* itself is a single Bash script.

*I use this term deliberately, and it does make me stop and think every time I see scripts in a bin directory (where “bin” stands for binary). But that’s a conversation for another time.

The author, Dylan Araps has produced other interesting pieces of software (such as neofetch) as well some great documents such as the pure bash bible as well as the pure sh bible. He’s also the creator of Kiss Linux. He has a reputation for writing great Bash code, so this seems like an opportunity too good to miss to learn from better programmers.

It seems that recently Dylan has disappeared off the radar, I don’t know what the situation is but I wish him well.

Anyway, I wanted to take a first look at fff to see what I could discern. I’m reviewing the code as it stands at the latest to-date commit, i.e. here.

Where I can, I link to reference material so you can dig in further to Bash details that take your fancy. This reference material includes the following sites (and there are more of course):

Programming Tools

This is where all the vim VS emacs posts should go.

Created on Oct 19, 2020
By @gurlic