Module: Chitin::Builtins::Prompts
- Included in:
- Chitin::Builtins
- Defined in:
- lib/chitin/commands/builtins.rb
Instance Method Summary collapse
-
#big_prompt ⇒ Object
The standard prompt.
- #prompt ⇒ Object
- #small_prompt ⇒ Object
Instance Method Details
#big_prompt ⇒ Object
The standard prompt. Must return a string. Override this to provide a custom prompt.
99 100 101 102 103 |
# File 'lib/chitin/commands/builtins.rb', line 99 def big_prompt "+-#{'-' * ENV['USER'].length}--#{'-' * short_pwd.length}-+\n" + "| #{ENV['USER']}: #{short_pwd} |\n" + "+-#{'-' * ENV['USER'].length}--#{'-' * short_pwd.length}-+ " end |
#prompt ⇒ Object
109 110 111 |
# File 'lib/chitin/commands/builtins.rb', line 109 def prompt big_prompt end |
#small_prompt ⇒ Object
105 106 107 |
# File 'lib/chitin/commands/builtins.rb', line 105 def small_prompt "#{ENV['USER']}: #{short_pwd} % " end |