Improved bash completion based on a preliminary patch by Krzysiek Pawlik.
Improved bash completion based on a preliminary patch by Krzysiek Pawlik.

File arguments in the working copy are completed based on the current
subversion subcommand, by invoking 'svn status' and filtering its output.
For instance, only modified files are completed for 'revert', and so on.

The status invocation while completing may be costly, especially if 
recursive or if externals are followed. However the repos is not accessed.

Full activation is achieved by setting environment variable SVN_BASH_COMPL_EXT
to 'svnstatus recurse externals'.  Both later options seem quite unadvisable
on large working copies, but the simple 'svnstatus' version is reasonable. 

Completion outside a working copy results in an error message.

This addition is safe as it is not activated by default.
Basic tests are okay with bash 2.05b and 3.1.17.

* tools/client-side/bash_completion: 
  - _svn_grcut and _svn_lls support functions added.
    these functions do not rely on anything but the shell.
  - better completion for file arguments in working copy.
  - more ".svn" special-directory occurences are filtered out.


git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@865847 13f79535-47bb-0310-9956-ffa450edef68

YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion