feature request

Frederik Eaton frederik at a5.repetae.net
Sun Mar 6 22:07:02 GMT 2005


On Sat, Mar 05, 2005 at 10:48:38PM -0800, Wayne Davison wrote:
> On Sat, Mar 05, 2005 at 05:54:28PM -0800, Frederik Eaton wrote:
> > It breaks some functionality of the
> > --include and --exclude options:
> 
> True.  You can work around that problem if you always use an '=' to
> connect the option to its arg by adding a new match to the case in that
> function:
> 
>     --exclude=*|--include=*|--filter=*) ;;
> 
> That will allow you to specify "--include=foo/" without the slash
> getting stripped.  (And, if you wanted to, you could extend the script
> to understand the non-equal version of those options too, but it would
> need a more complicated parsing loop).
> 
> > However, you haven't given your reasons for not wanting to include
> > the proposed option. I'm curious.
> 
> #1: I don't really like the idea -- a trailing slash has a particular
> meaning to rsync, and I don't like the idea of complicating it by
> adding an option.  #2: it's the sort of thing a shell is good at
> solving, so I think that is the appropriate place to customize this.

Yeah. My hope was to have the option added as part of letting people
migrate to what I saw as a better syntax, but you're right that it
would complicate things, and it wouldn't be worth it if nobody
adopted. Maybe it was a bad idea.

> Aside:  I'll mention one other thing that can help with trailing
> slashes in general, and that is the Z-shell.  It has the ability to
> auto-remove auto-added characters depending on what you type.  For
> instance, if you typed "rsync -av long-<TAB>" and it completed the
> directory name to "long-named-dir/", if you then typed a space to move
> on to the destination name, zsh would auto-remove the slash (it would
> leave it if you started typing a name within the dir or if you
> explicitly typed a slash).  It does the same sort of thing with other
> auto-added characters, such as a ':' that appears when completing a
> user-name following the chown command (just in case you want to add a
> group) and quite a few others.  Just FYI -- switching shells may not be
> an option, but I thought I'd mention it because not everyone knows that
> zsh has this feature.

No, I use zsh and I'm aware of the feature, but I don't think it's
possible to turn it on just for rsync, and I didn't like having it on
for everything. Thanks,

Frederik


More information about the rsync mailing list