Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: svn completion under Cygwin



On 2008-09-23 at 10:28 +0200, Vadim Zeitlin wrote:
> On Mon, 22 Sep 2008 16:36:55 -0700 Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:
> PP> I suspect that we need an _svn_osfixup() filter after the svn command,
> PP> where that would, for the Windows OSes (I forget the values of $OSTYPE
> PP> there) apply changes.  But before that can be written, what 'foo\bar'
> PP> maps to needs to be determined, so that we can reverse it.
> 
>  I agree in theory but in practice it looks rather unlikely that anybody
> uses backslash in their file names...

Well, nobody using Windows, anyway.  ;-)

So,
case $OSTYPE in
  (...) function _svn_osfixup { tr '\\' '/' } ;;
  (*) function _svn_osfixup { cat } ;;
esac

_cache_svn_status[$dir]="$(_call_program files svn status -N $dir | _svn_osfixup)"

where ... should be whatever $OSTYPE is on Windows, or the list of such
types.

Make sense?

-Phil



Messages sorted by: Reverse Date, Date, Thread, Author