Update 2023-02-22 08:31 OpenBSD/amd64
This commit is contained in:
18
.bin/dev-dirs
Executable file
18
.bin/dev-dirs
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /usr/ports
|
||||
|
||||
[ ! -z "$1" ] && EXTRA="-q $1"
|
||||
|
||||
_ports=$(echo "SELECT PkgPath from Paths;" \
|
||||
| sqlite3 /usr/local/share/sqlports \
|
||||
| sort -u)
|
||||
|
||||
_list=$(find /usr/ports/mystuff/*/* /usr/src/*/* /usr/xenocara/*/* -type d -maxdepth 0)
|
||||
|
||||
echo "$_ports" "$_list" "/usr/src" "/usr/ports" "/usr/www" "/usr/xenocara" \
|
||||
| grep -v "/CVS" \
|
||||
| while IFS= read -r l; do echo "${#l} $((++n)) $l"; done \
|
||||
| sort -n \
|
||||
| cut -d" " -f3- \
|
||||
| fzf $EXTRA -e -i -0 -1 +s --preview "tree {1}"
|
||||
Reference in New Issue
Block a user