From e8449fdf180c63e1f872cdbea46f942d348eb2b9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 22 Sep 2008 07:10:52 +0200 Subject: Added anytag --- etc/functions/anytag | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 etc/functions/anytag (limited to 'etc/functions') diff --git a/etc/functions/anytag b/etc/functions/anytag new file mode 100644 index 0000000..0d3c090 --- /dev/null +++ b/etc/functions/anytag @@ -0,0 +1,19 @@ +## vim:ft=zsh +## anytag - tag files based on symlinks (quick&dirty) + +typeset -T REPLY reply ' ' +typeset cmd=$1 +typeset file tag + +mkdir -p .tags +for file in *(.); do + eval $cmd + read + for tag in $reply; do + mkdir -p tags/$tag + ( + cd tags/$tag + ln -s ../../$file + ) + done +done -- cgit v1.2.3