locate-fzy.sh 277 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. IFS=$'\n\t'
  4. SCRIPT_NAME="${0##*/}"
  5. display_help() {
  6. echo "Requirements: fzy locate|mlocate|plocate"
  7. echo "Usage: ${SCRIPT_NAME} [optional arg/s] <mandatory arg/s>"
  8. exit 2
  9. }
  10. [[ $# -lt 1 ]] && display_help
  11. locate "*" | fzy