From 1ea13e42716c5ee80399a898c25fb23b2e5ae46a Mon Sep 17 00:00:00 2001 From: Helge Date: Wed, 3 Jul 2013 22:06:51 +0200 Subject: [PATCH] Fix "No such file or directory" on tab-completion Checks if the directory ~/.autorandr exists before searching for profiles. Example error message: autorandr -find: `/root/.autorandr/*': No such file or directory --- bash_completion/autorandr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bash_completion/autorandr b/bash_completion/autorandr index b009994..151c596 100644 --- a/bash_completion/autorandr +++ b/bash_completion/autorandr @@ -10,7 +10,11 @@ _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'`" + if [ -d ~/.autorandr ]; then + prfls="`find ~/.autorandr/* -maxdepth 1 -type d -printf '%f\n'`" + else + prfls="" + fi case "${cur}" in --*) -- 2.39.5