X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=contrib%2Fbash_completion%2Fautorandr;h=03beabe9f2f87bdebe2e96f3f8e0bc8519dd24c1;hb=d38e22e5064d448099d1925cce16593a327c7d74;hp=e7f098c1b4474db3596c2e659fbf74e80b469feb;hpb=7fda58e351b52f2245c97f5d06685e3b9ab06363;p=deb_pkgs%2Fautorandr.git diff --git a/contrib/bash_completion/autorandr b/contrib/bash_completion/autorandr index e7f098c..03beabe 100644 --- a/contrib/bash_completion/autorandr +++ b/contrib/bash_completion/autorandr @@ -29,9 +29,9 @@ _autorandr () 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