From 63c4ace648b2cbeceaafabb27d1dce7512a63ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=9A=E4=BB=81?= Date: Tue, 2 May 2017 10:54:50 +0800 Subject: [PATCH] Make installer more path-with-spaces-proof, fixes #952 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NOTE: This doesn't make Bash-it usable as there's so many similar errors scattered in other locations, this commit simply makes installer works Signed-off-by: ๆž—ๅšไป --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a08c76ce..4cd7f4d9 100755 --- a/install.sh +++ b/install.sh @@ -31,7 +31,7 @@ function load_one() { function load_some() { file_type=$1 [ -d "$BASH_IT/$file_type/enabled" ] || mkdir "$BASH_IT/$file_type/enabled" - for path in `ls $BASH_IT/${file_type}/available/[^_]*` + for path in "$BASH_IT/${file_type}/available/"[^_]* do file_name=$(basename "$path") while true