Subject: [PATCH Cogito] Allow spaces in $HOME

From: Jonas Fonseca <[email-masked]>
Date: Sat, 8 Oct 2005 19:41:06 +0200

Fixes sourcing of ~/.cgrc

Signed-off-by: Jonas Fonseca <[email-masked]>

---

diff --git a/cg-Xlib b/cg-Xlib
index b27e8b9..1644913 100755
--- a/cg-Xlib
+++ b/cg-Xlib
@@ -336,8 +336,8 @@ ARGPOS=0
 
 if [ -t 1 -a -e "$HOME/.cgrc" ]; then
 	_cg_name=${_cg_cmd#cg-}
-	_cg_defaults1="$(sed -n "/^$_cg_cmd/s/^$_cg_cmd //p" < $HOME/.cgrc)"
-	_cg_defaults2="$(sed -n "/^$_cg_name/s/^$_cg_name //p" < $HOME/.cgrc)"
+	_cg_defaults1="$(sed -n "/^$_cg_cmd/s/^$_cg_cmd //p" < "$HOME/.cgrc")"
+	_cg_defaults2="$(sed -n "/^$_cg_name/s/^$_cg_name //p" < "$HOME/.cgrc")"
 	ARGS=($_cg_defaults1 $_cg_defaults2 "${ARGS[@]}")
 fi
 
-- 
Jonas Fonseca