19 lines
522 B
Plaintext
19 lines
522 B
Plaintext
![]() |
#!/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}"
|