class Aliasing::CLI
Public Instance Methods
make_alias(name, command, location = "~/.bash_profile")
click to toggle source
# File lib/aliasing/cli.rb, line 16 def make_alias(name, command, location = "~/.bash_profile") Aliasing.make_alias name, command, location end
most_frequent(history_file, num = 10)
click to toggle source
# File lib/aliasing/cli.rb, line 7 def most_frequent(history_file, num = 10) f = File.new(history_file) history = f.read.split "\n" History.new(history).most_frequent(num.to_i).each{ |k, v| puts "'#{k}' - #{v}" } end