u/Infamous-Rem

▲ 45 r/bash

A little fzf function I use constantly to jump into any subfolder

Not sure if this is old news to everyone but I use this all day so figured I'd share. I got sick of typing cd really/long/nested/path/to/thing so I "made" this:

#fuzzy cd into any subdirectory
fcd() {
    local dir
    dir=$(find "${1:-.}" -type d 2>/dev/null | fzf) && cd "$dir" || return
}

Drop it in your .bashrc, open a new shell, and just run fcd. It lists every folder under where you are, you start typing, hit enter, and you're in it. You can also give it a starting point like fcd ~/projects if you don't want to scan from the current dir.

Curious if anyone has a slicker version. I'm sure there's a way to make it faster on huge trees.

reddit.com
u/Infamous-Rem — 9 days ago
▲ 6 r/flask

Trying to get into flask but I'm having troubles with it.

Done a fair bit of Django, now poking at Flask for small stuff (with AI help ofc). Recently built a little HealthReporter UI with Flask as the API, it uses AI to read my app's stats from Prometheus, and my GitHub PRs, and it evaluates if something recently merged is causing issues with any of the services. My actual prod app is Next.js + Django, but this was small enough that I figured I'd finally give Flask a shot.

Maybe I went about it wrong, but I ended up having to build out basically everything myself. Didn't feel like a "framework" the way Django does, way more lightweight, which is nice, but also a lot more wiring on my end.

Is that normal, or am I just going about it wrong?

reddit.com
u/Infamous-Rem — 10 days ago