Roman Rakus b2750f
			     BASH PATCH REPORT
Roman Rakus b2750f
			     =================
Roman Rakus b2750f
Roman Rakus b2750f
Bash-Release:	4.1
Roman Rakus b2750f
Patch-ID:	bash41-002
Roman Rakus b2750f
Roman Rakus b2750f
Bug-Reported-by:	guillaume.outters@free.fr
Roman Rakus b2750f
Bug-Reference-ID:	<20100105230441.70D171AA7F52@asterix.local>
Roman Rakus b2750f
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00017.html
Roman Rakus b2750f
Roman Rakus b2750f
Bug-Description:
Roman Rakus b2750f
Roman Rakus b2750f
Bash-4.1/Readline-6.1 introduced a hook function that allows applications
Roman Rakus b2750f
to rewrite or modify filenames read from the file system before comparing
Roman Rakus b2750f
them with a word to be completed.  The converted filename, if it matches,
Roman Rakus b2750f
needs to be inserted into the line buffer, replacing the original contents.
Roman Rakus b2750f
Roman Rakus b2750f
This fixes a completion bug on Mac OS X involving filenames containing
Roman Rakus b2750f
UTF-8 characters.
Roman Rakus b2750f
Roman Rakus b2750f
Patch (apply with `patch -p0'):
Roman Rakus b2750f
Roman Rakus b2750f
*** ../bash-4.1-patched/lib/readline/complete.c	2009-11-29 18:39:30.000000000 -0500
Roman Rakus b2750f
--- lib/readline/complete.c	2010-01-06 08:30:23.000000000 -0500
Roman Rakus b2750f
***************
Roman Rakus b2750f
*** 2139,2143 ****
Roman Rakus b2750f
        if (filename_len == 0)
Roman Rakus b2750f
  	{
Roman Rakus b2750f
! 	  if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name))
Roman Rakus b2750f
  	    continue;
Roman Rakus b2750f
  
Roman Rakus b2750f
--- 2139,2143 ----
Roman Rakus b2750f
        if (filename_len == 0)
Roman Rakus b2750f
  	{
Roman Rakus b2750f
! 	  if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn))
Roman Rakus b2750f
  	    continue;
Roman Rakus b2750f
  
Roman Rakus b2750f
***************
Roman Rakus b2750f
*** 2220,2224 ****
Roman Rakus b2750f
  	    }
Roman Rakus b2750f
  
Roman Rakus b2750f
! 	  strcpy (temp + dirlen, entry->d_name);
Roman Rakus b2750f
  	}
Roman Rakus b2750f
        else
Roman Rakus b2750f
--- 2220,2224 ----
Roman Rakus b2750f
  	    }
Roman Rakus b2750f
  
Roman Rakus b2750f
! 	  strcpy (temp + dirlen, convfn);
Roman Rakus b2750f
  	}
Roman Rakus b2750f
        else
Roman Rakus b2750f
*** ../bash-4.1-patched/patchlevel.h	2009-10-01 16:39:22.000000000 -0400
Roman Rakus b2750f
--- patchlevel.h	2010-01-14 09:38:08.000000000 -0500
Roman Rakus b2750f
***************
Roman Rakus b2750f
*** 26,30 ****
Roman Rakus b2750f
     looks for to find the patch level (for the sccs version string). */
Roman Rakus b2750f
  
Roman Rakus b2750f
! #define PATCHLEVEL 1
Roman Rakus b2750f
  
Roman Rakus b2750f
  #endif /* _PATCHLEVEL_H_ */
Roman Rakus b2750f
--- 26,30 ----
Roman Rakus b2750f
     looks for to find the patch level (for the sccs version string). */
Roman Rakus b2750f
  
Roman Rakus b2750f
! #define PATCHLEVEL 2
Roman Rakus b2750f
  
Roman Rakus b2750f
  #endif /* _PATCHLEVEL_H_ */