Created
October 29, 2008 22:19
-
-
Save ryanfb/20846 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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