Skip to content

Instantly share code, notes, and snippets.

@ryanfb
Created October 29, 2008 22:19
Show Gist options
  • Select an option

  • Save ryanfb/20846 to your computer and use it in GitHub Desktop.

Select an option

Save ryanfb/20846 to your computer and use it in GitHub Desktop.
proc tag {url args} {
if { ![regexp {^http://} $url] } {
return "Usage: tcl tag [color red]URL[color] tags."
} else {
if { ![info exists ::urltags($url)] } {
set ::urltags($url) $args
} else {
set l $::urltags($url)
foreach e $args {if { [lsearch -exact $l $e] == -1 } {lappend l $e}}
set ::urltags($url) $l
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment