bash_completion: load profiles only when .autorandr directory exists

This commit is contained in:
Ondřej Vodáček 2013-07-20 13:17:28 +02:00
parent 4f5e2401ef
commit 2926c36940

View File

@ -10,7 +10,10 @@ _autorandr ()
opts="-h -c -s -l -d"
lopts="--help --change --save --load --default --force --fingerprint"
prfls="`find ~/.autorandr/* -maxdepth 1 -type d -printf '%f\n'`"
prfls=""
if [ -d ~/.autorandr/ ]; then
prfls="`find ~/.autorandr/* -maxdepth 1 -type d -printf '%f\n'`"
fi
case "${cur}" in
--*)