Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. proc tastebin::add_history { msg } {
  2.     variable options
  3.    
  4.     lappend options(history) $msg
  5.    
  6.     if {!$options(save_history_to_file)} {
  7.     return
  8.     }
  9.    
  10.     puts $msg
  11.     catch { file mkdir [file join $::configdir tastebin-history]}
  12.     set file [open [file join $::configdir tastebin-history history] a]
  13.     puts $file $msg
  14.     close $file
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement