26 lines
469 B
Bash
Executable File
26 lines
469 B
Bash
Executable File
#!/bin/sh
|
|
|
|
while getopts "he:" arg; do
|
|
case $arg in
|
|
e)
|
|
if [ -z "$excludes" ]; then
|
|
excludes="-path $OPTARG"
|
|
else
|
|
excludes="$excludes -o -path $OPTARG"
|
|
fi
|
|
;;
|
|
[h?])
|
|
printf "Usage: %s: [-e exclude path] [path]\n" $0
|
|
exit;;
|
|
esac
|
|
done
|
|
|
|
shift $(($OPTIND - 1))
|
|
|
|
file="$(find ${1:-$HOME} ! \( \( $excludes \) -prune \) -print0\
|
|
| fuzzel --dmenu0 -p "find > ")"
|
|
|
|
[ -z "$file" ] && exit
|
|
|
|
exec xdg-open "$file"
|