Update 2023-01-08 17:34 OpenBSD/amd64
This commit is contained in:
47
.bin/dev-src
47
.bin/dev-src
@@ -1,9 +1,25 @@
|
||||
#!/bin/sh
|
||||
. ~/.bin/_config
|
||||
|
||||
cd "${DEVDIR}"
|
||||
if [ ! -z "$1" ]
|
||||
then
|
||||
QUERY="--query $1"
|
||||
fi
|
||||
export INITIAL_QUERY="$1"
|
||||
|
||||
F=$(find * \
|
||||
cd /usr
|
||||
|
||||
( find src \
|
||||
ports/{archivers,astro,audio,benchmarks} \
|
||||
ports/{biology,books,cad,chinese,comms} \
|
||||
ports/{converters,databases,devel,editors} \
|
||||
ports/{education,emulators,fonts,games} \
|
||||
ports/{geo,graphics,infrastructure} \
|
||||
ports/{inputmethods,japanese,java,korean} \
|
||||
ports/{lang,mail,math,meta,misc,multimedia} \
|
||||
ports/{mystuff,net,news,plan9,print} \
|
||||
ports/{productivity,security,shells,sysutils} \
|
||||
ports/{telephony,textproc,wayland,www,x11} \
|
||||
-not -path "*/CVS/*" \
|
||||
-not -path "*/.git/*" \
|
||||
-type f \
|
||||
@@ -20,17 +36,26 @@ F=$(find * \
|
||||
-o -name "*.in" \
|
||||
-o -name "*conf" \
|
||||
-o -name "*devs" \
|
||||
-o -name "Makefile" \
|
||||
-o -name "patch-*" \
|
||||
-o -name "Makefile*" \
|
||||
-o -name "PLIST*" \
|
||||
-o -name "DESCR*" \
|
||||
-o -name ".gitignore" \
|
||||
-o -name ".cvsignore" \
|
||||
\) | fzf \
|
||||
--exact \
|
||||
--no-sort \
|
||||
--preview-window=right:65% \
|
||||
--preview='highlight -O ansi -O xterm256 --force {}' \
|
||||
);
|
||||
\) > /tmp/dev-src-list.tmp && mv /tmp/dev-src-list.tmp /tmp/dev-src-list ) &
|
||||
|
||||
|
||||
[ ! -f /tmp/dev-src-list ] \
|
||||
&& wait
|
||||
|
||||
|
||||
F="$(fzf --exact \
|
||||
--no-sort \
|
||||
--preview-window=right:65% \
|
||||
$QUERY \
|
||||
--preview='highlight -O ansi -O xterm256 --force {}' \
|
||||
< /tmp/dev-src-list
|
||||
)"
|
||||
|
||||
[ -z "$F" ] || v "$F"
|
||||
|
||||
test -z "$F" \
|
||||
|| vim "$F";
|
||||
|
||||
Reference in New Issue
Block a user