summaryrefslogtreecommitdiff
path: root/bin/common/goo
blob: 2a5faad260366e505535c32e71db828744bb306d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

exclude="
.cache 
.mozilla
.npm
.git
site-packages
objects
instances
discord
Steam
?eclipse
VisualParadigm
intellij
arduino15"

if [ -n "$2" ]
then
	[ -d "$2" ] && dest="$2" || opt="-q $2"
fi

for dir in $exclude; do
    dirs="$dirs -name \"$dir\" -o "
done
cmd="find ${dest:-$HOME} \(${dirs} -false \) -prune -o -type ${1:-f} -mindepth 1 -print"

eval "$cmd" 2>/dev/null | fzf $opt