On Wed, May 02, 2012 at 12:21:56 -0400, Joey Hess wrote:
> This may fall under my general TODO of making vidir be able to run
> arbitrary commands intelligently based on properties of the files,
> compressing/uncompressing/converting/moving/etc. I have never yet sat down
> and came up with a configuration file format that it could use to define
> these types of actions in a sane and clear way. I seem to have a mental
> block about that, as all I can think of is some nasty pattern matching
> thing, or a full-fledged programming language thing.

How about just allowing the user to specify a script?  Then you could
execute, e.g.,
  "$script" mv -- "$old" "$new"
  "$script" rm -- "$old"

$script=git would work as expected; anything more complex like
compression/conversion could be implemented with a wrapper.

If it were possible to configure a default script, I could try to detect
whether the files were in a repository and run "git mv" or "mv" (etc.)
as appropriate.

-- Michael

Attachment: signature.asc
Description: Digital signature

Reply via email to