On Thursday 04 December 2008, Simon 'corecode' Schubert
[off-list ref] 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/ \_/