Advertisement
Guest User

Untitled

a guest
Jun 17th, 2017
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
BOO 0.34 KB | None | 0 0
  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.    
  12.     catch { file mkdir [file join $::configdir tastebin_history]}
  13.     set file [open [file join $::configdir tastebin_history history] a]
  14.     puts $file $msg
  15.     flush $file
  16.     close $file
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement