Class: Fantassh::BashHistory
- Inherits:
-
Object
- Object
- Fantassh::BashHistory
- Defined in:
- lib/fantassh/bash_history.rb
Instance Method Summary collapse
Instance Method Details
#entries ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/fantassh/bash_history.rb', line 3 def entries File.readlines(File.join(Dir.home, '.bash_history')). grep(/^\s*ssh/). map(&:strip). uniq. map { |x| x.gsub(/^ssh\s+/, '') } end |