Open jpaugh opened 6 months ago
I have ~/proj/rust
, ~/proj/vue
, and upwards of 10 other categories under my own ~/proj
folder; and some of the projects are just under ~/proj
; so I needed something more flexible to grab all of them without grabbing too much. I'm sharing this upstream because I think others would find it to be a useful starting point.
I tried to match the find
command to the list of folders that you have here. Should be mostly a drop-in replacement, with possibly extra results.
It will trim non-git-projects from the list, though. So ~/work/builds/*
might not show up in the fzf list anymore.
Side note: I have no idea why you're not using fzf --cycle --layout=reverse
. IMO it's a much better default. Try it out sometime. Didn't add that change here to avoid bikeshedding.
This changes the set of projects which are surfaced to fzf in two ways:
More subfolders are considered. (maxdepth is effectively increased by one.) This allows selecting from new category folders (e.g. ~/personal/yt) without modifying this script to explicitly mention each one.
Projects which lack a .git folder will not be considered. This is mostly a positive thing, since it encourages us to use source control. However, it may remove important non-code folders from consideration.