Congrats for getting this out!

> I also wanted an excuse to learn

This is the best reason ever, and not just for you: seeing your GIF I thought "could I achieve that with fzf?". Turns out, yes I can:

    function fcd() {
      local dir;
    
      while true; do
        # exit with ^D
        dir="$(ls -a1p | grep '/$' | grep -v '^./$' | fzf --height 40% --reverse --no-multi --preview 'pwd' --preview-window=up,1,border-none --no-info)"
        if [[ -z "${dir}" ]]; then
          break
        else
          cd "${dir}"
        fi
      done
    }
Certainly not the best code (and definitely not a jab at your implementation!) but, hey, it was purely for the heck of it.

Lately I've been trying to find the joy in programming again, these kind of fun little challenges help a lot, so thanks for sharing, enthusiasm and creativity is contaminating :)

> could I achieve that with fzf?

I've been sporting this alias for a while now:

    alias pf="fzf --preview='less {}' --bind shift-up:preview-page-up,shift-down:preview-page-down"
You can run `pf` (preview file) in a directory and it opens a split window with fzf where you can preview text files with less and optionally filter down which files are matched with fzf.

fzf is great.

N'other silly one:

    git log --oneline --decorate --color | fzf --ansi --preview 'git show $(echo {} | cut -d" " -f1)'
The possibilities, they are _endless_ !!11!1!
Indeed!

If you're using the fzf.vim plugin[0] you can run `:Commits` to do something similar to your command too. It adds a bit more detail such as when the commit was made in relative format and color codes the git diff.

[0]: https://github.com/junegunn/fzf.vim