Skip to content

Instantly share code, notes, and snippets.

@jackdempsey
Created June 29, 2010 02:05
Show Gist options
  • Save jackdempsey/456688 to your computer and use it in GitHub Desktop.
Save jackdempsey/456688 to your computer and use it in GitHub Desktop.
def rem(string=nil)
storage_file = ENV['HOME'] + '/.remembered_commands'
if string == :clear
File.unlink(storage_file)
elsif string
File.open(storage_file,'a') do |f|
f.puts string
end
else
File.read(storage_file)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment