#!/usr/bin/env ruby
#title:tag
#author:Aaron Radke
#date:2008-01-30
#abstract:a simple tagging app to save snippits and retreave them back
#------------
tag_file = "#{ENV['HOME']}/.tags"
#puts "ARGV: #{ARGV.join(",")}"
key = ARGV.shift
if key == "-s" and ARGV.size >= 2
f = File.open(tag_file,"a")
tag = ARGV.shift
value = ARGV.join(" ")
f.puts "#{tag}\t#{value}"
f.close
exit
end
unless key
null
puts "Requries an argument"
exit
end
tag_string = <