19 lines
556 B
Bash
Executable File
19 lines
556 B
Bash
Executable File
#!/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/*/* /usr/src /usr/xenocara /usr/ports -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}"
|