2018-08-27 13:30:54 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Fuzzy find a file and then check which package owns it
|
|
|
|
|
2018-09-13 15:46:32 -07:00
|
|
|
printHelp() {
|
|
|
|
cat << EOF
|
|
|
|
fqo - fuzzy find a file and then check which package owns it
|
|
|
|
Usage: fqo [patterns]
|
|
|
|
|
|
|
|
Options:
|
|
|
|
-h show this help page
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
[[ -z "${*}" ]] && echo "No patterns specified" && exit 1
|
|
|
|
|
2018-08-27 13:30:54 -07:00
|
|
|
locate --all --ignore-case --null -- "${@}" | fzf --read0 --exit-0 --select-1 | pacman -Qo -
|