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

Re[2]: svn completion under Cygwin



On Tue, 23 Sep 2008 08:08:11 -0700 Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:

PP> Well, nobody using Windows, anyway.  ;-)

 Well, Cygwin is almost Unix :-/

PP> So,
PP> case $OSTYPE in
PP>   (...) function _svn_osfixup { tr '\\' '/' } ;;

 s/.../cygwin/ -- at least this is OSTYPE value here.

PP>   (*) function _svn_osfixup { cat } ;;
PP> esac
PP> 
PP> _cache_svn_status[$dir]="$(_call_program files svn status -N $dir | _svn_osfixup)"
PP> 
PP> where ... should be whatever $OSTYPE is on Windows, or the list of such
PP> types.
PP> 
PP> Make sense?

 Yes, perfectly. I guess it could be nice to get rid of an extra unneeded
pipe to cat under normal systems but I don't see any nice way to do it (the
obvious one would define a variable which would be either empty or contain
"| tr '\\' '/'" but this would require an eval).

 Thanks,
VZ

Attachment: pgpeaT1rTD2Ix.pgp
Description: PGP signature



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