Class: Thor

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/rails_ai_context/install/install_generator.rb

Overview

Thor's interactive ask reads the line through Reline once the readline library is available, and Reline writes cursor control escape sequences (hide/show cursor, clear line) to support in-place editing - it does this even when neither end of the process is attached to a real terminal. Restrict it to genuine TTY sessions so piped or redirected runs (CI, rails generate ... < /dev/null, captured logs) get plain prompt text instead of raw escape codes; Thor already falls back to a plain, escape-free reader when this returns false.

Defined Under Namespace

Modules: LineEditor