dotfiles/.bin/dev-dirs

27 lines
561 B
Plaintext
Raw Normal View History

2023-02-22 08:31:38 +01:00
#!/bin/sh
cd /usr/ports
[ ! -z "$1" ] && EXTRA="-q $1"
_ports=$(find \
/usr/ports/* \
/usr/ports/mystuff/* \
/usr/ports/openbsd-wip/* \
-type d \
-maxdepth 1 \
| grep -v -E distfiles\|pobj\|plist\|CVS)
2023-02-22 08:31:38 +01:00
_sys=$(find /usr/src/*/* -type d -maxdepth 0 \
| grep -v -E distfiles\|pobj\|plist\|CVS)
_system=\
"/usr/src
/usr/src/sys
/usr/xenocara
/usr/www
/usr/ports"
echo "$_ports\n$_system\n$_sys" \
| sort -u | fzf $EXTRA -e -i -0 -1 --preview "cat {1}/Makefile"