On Jan 24, 2009, at 10:09 AM, Fabien Coelho wrote:
> Author: fabien
> Date: Sat Jan 24 10:09:36 2009
> New Revision: 35444
>
> Log:
> Fix completion bug for revert when only a prop was modified.
>
> * tools/client-side/bash_completion:
> fix IFS not to ignore leading spaces from "svn status" output.
>
> Modified:
> trunk/tools/client-side/bash_completion
>
> Modified: trunk/tools/client-side/bash_completion
> URL: http://svn.collab.net/viewvc/svn/trunk/tools/client-side/bash_completion?pathrev=35444&r1=35443&r2=35444
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/tools/client-side/bash_completion Sat Jan 24 04:52:57 2009
> (r35443)
> +++ trunk/tools/client-side/bash_completion Sat Jan 24 10:09:36 2009
> (r35444)
> @@ -44,8 +44,13 @@ function _svn_read_hashfile()
> function _svn_grcut()
> {
> local re=$1 line=
> + # fix IFS, so that leading spaces are not ignored by next read.
> + # (there is a leading space in svn status output if only a prop
> is changed)
> + # outside IFS is not broken because the function is called in a
> subshell
> + IFS='
> +'
> while read -r line ; do
> - [[ ! $re || $line == $re ]] && echo ${line/???????/}
> + [[ ! $re || $line == $re ]] && echo "${line/???????/}"
> done
Don't you have to reset IFS when you're done with it, or is the change
local to this function?
Regards,
Blair
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1047326
Received on 2009-01-24 20:19:09 CET