Module: Kernel

Defined in:
lib/muflax/panes.rb,
lib/muflax/kernel.rb

Overview

Copyright Freya Dorn <[email protected]>, 2014 License: GNU GPL 3 <www.gnu.org/copyleft/gpl.html>

Instance Method Summary collapse

Instance Method Details

#clear_screenObject



7
8
9
# File 'lib/muflax/panes.rb', line 7

def clear_screen
  print "\e[H\e[2J"
end

#clear_tmux_historyObject



11
12
13
# File 'lib/muflax/panes.rb', line 11

def clear_tmux_history
  system "tmux", "clear-history"
end

#fish(command) ⇒ Object



18
19
20
# File 'lib/muflax/kernel.rb', line 18

def fish command
  system "fish", "-l", "-c", command
end

#hrObject



7
8
9
10
11
12
# File 'lib/muflax/kernel.rb', line 7

def hr
  width, height = HighLine::SystemExtensions.terminal_size
  linewidth     = [(width || 0) - 1, 1].max

  puts "-" * (linewidth)
end

#zsh(command) ⇒ Object



14
15
16
# File 'lib/muflax/kernel.rb', line 14

def zsh command
  system "zsh", "-l", "-c", command
end