Class: Scide::Commands::Tail
- Inherits:
-
Run
- Object
- Scide::Command
- Show
- Run
- Scide::Commands::Tail
- Defined in:
- lib/scide/commands/tail.rb
Overview
Tails a file.
Configuration Example
# this YAML configuration,
projects:
project1:
options:
tail: '-n 1000'
windows:
- "window1 TAIL $HOME/fubar.txt"
# will produce the following command in window1:
tail -n 1000 -f $HOME/fubar.txt
Instance Attribute Summary
Attributes inherited from Scide::Command
Instance Method Summary collapse
-
#initialize(contents, options = {}) ⇒ Tail
constructor
Returns a new tail command.
Methods inherited from Run
Methods inherited from Show
Methods inherited from Scide::Command
resolve, #text_with_options, #to_screen
Constructor Details
#initialize(contents, options = {}) ⇒ Tail
Returns a new tail command.
See class definition for examples.
Arguments
-
contents
- The file to tail. -
options
- Options that can be used in the contents of the command.
Options
-
tail => string
- Arguments to tail.
31 32 33 34 |
# File 'lib/scide/commands/tail.rb', line 31 def initialize contents, = {} super contents, @text = [ 'tail', [:tail].to_s, '-f', @text.to_s ].select(&:present?).join(' ') end |