From: Boyd Stephen Smith Jr. Date: Thu, 04 Dec 2008 18:28:58 GMT Subject: Re: [PATCH] Allow passing of --directory to git-am. Message-ID: <200812041228.58885.bss03@volumehost.net> In-Reply-To: <49380D84.5050403@fs.ei.tum.de> On Thursday 04 December 2008, Simon 'corecode' Schubert wrote about '[PATCH] Allow passing of --directory to git-am.': >- --whitespace) >- git_apply_opt="$git_apply_opt $1=$2"; shift ;; >+ --whitespace|--directory) >+ quot=$(echo "$2" | sed -e "s/'/\\'/g") >+ git_apply_opt="$git_apply_opt $1='$quot'"; shift ;; Test: bss@monster:~$ echo "don't" | sed -e "s/'/\\'/g" don't bss@monster:~$ I'm thinking your sed line doesn't do what you think it does. You probably want something like: bss@monster:~$ echo "don't" | sed -e "s/'/'\\\\''/g" don'\''t -- Boyd Stephen Smith Jr. ,= ,-_-. =. bss03@volumehost.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.org/ \_/