diff --git a/src/beefind.sh.in b/src/beefind.sh.in index 6275d7b..59faf09 100644 --- a/src/beefind.sh.in +++ b/src/beefind.sh.in @@ -42,13 +42,13 @@ function usage() { Usage: beefind [options] Options: - -c, --cutroot strip from printed files - -e, --exclude ignore files matching - -s, --skiplist ignore files matching pattern described in + -c, --cutroot strip from printed files + -e, --exclude ignore files matching + -s, --exclude-list ignore files matching pattern described in - -o, --output output is redirected into instead of + -o, --output output is redirected into instead of - -h, --help display this help + -h, --help display this help EOF } @@ -57,7 +57,7 @@ function do_beefind() { local options=$(${BEEGETOPT} --name beefind \ --option cutroot/c \ --option exclude/e= \ - --option skiplist/s= \ + --option exclude-list/E= \ -- "${@}") if [ $? != 0 ] ; then @@ -69,7 +69,7 @@ function do_beefind() { declare find_format="%p\n" declare -a OPT_EXCLUDE - declare -a OPT_SKIPLIST + declare -a OPT_EXCLUDELIST while true ; do case "${1}" in @@ -78,11 +78,11 @@ function do_beefind() { shift 1 ;; --exclude) - OPT_EXCLUDE=( ${OPT_EXCLUDE:+${OPT_EXCLUDE[@]}} "${2}" ) + OPT_EXCLUDE=( "${OPT_EXCLUDE[@]}" "${2}" ) shift 2 ;; - --skiplist) - OPT_SKIPLIST=( ${OPT_SKIPLIST:+${OPT_SKIPLIST[@]}} "${2}" ) + --exclude-list) + OPT_EXCLUDELIST=( "${OPT_EXCLUDELIST[@]}" "${2}" ) shift 2 ;; --) @@ -102,8 +102,8 @@ function do_beefind() { grep \ --extended-regexp \ --invert-match \ - --file=<(if [ "${#OPT_SKIPLIST[@]}" -gt 0 ] ; then - grep --invert-match --regexp="^ *$" ${OPT_SKIPLIST[@]} + --file=<(if [ "${#OPT_EXCLUDELIST[@]}" -gt 0 ] ; then + grep --invert-match --regexp="^ *$" ${OPT_EXCLUDELIST[@]} fi) \ --file=<(for p in ${OPT_EXCLUDE[@]} ; do echo ${p}