Class: Rprompt::GitSha
- Inherits:
-
PromptItem
- Object
- PromptItem
- Rprompt::GitSha
- Defined in:
- lib/rprompt.rb
Instance Attribute Summary
Attributes inherited from PromptItem
Instance Method Summary collapse
-
#sha ⇒ String
Last five numbers form the sha1.
-
#show ⇒ String
Terminal representation of the number returned by ‘sha’.
Methods inherited from PromptItem
Methods included from Deco
Constructor Details
This class inherits a constructor from Rprompt::PromptItem
Instance Method Details
#sha ⇒ String
Returns last five numbers form the sha1.
54 55 56 |
# File 'lib/rprompt.rb', line 54 def sha commandResult.chomp[-6,6] end |
#show ⇒ String
Returns terminal representation of the number returned by ‘sha’.
59 60 61 |
# File 'lib/rprompt.rb', line 59 def show termShow({:color => color, :symbol => symbol, :content => sha}) end |