prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="-h -c -s -r -l -d"
- lopts="--help --change --save --remove --load --default --force --fingerprint --config --dry-run"
+ lopts="--help --change --cycle --save --remove --load --list --default --force --fingerprint --config --dry-run"
# find system-level autorandr dirs
OIFS="$IFS"
AR_DIRS=( "${AR_DIRS[@]}" "${XDG_CONFIG_HOME:-$HOME/.config}/autorandr/" )
fi
- if [ -n "${AR_DIRS}" ]
+ if [ "${#AR_DIRS[@]}" -gt 0 ]
then
- prfls="$(find "${AR_DIRS[@]}" -mindepth 1 -maxdepth 1 -type d ! -name "*.d" -printf '%f\n' | sort -u)"
+ prfls="$(find "${AR_DIRS[@]}" -mindepth 1 -maxdepth 1 -type d ! -name "*.d" -printf '%f\n' 2>/dev/null | sort -u)"
else
prfls=""
fi