rprompt 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/rprompt +12 -1
- data/lib/rprompt.rb +0 -1
- data/lib/rprompt/deco.rb +5 -0
- data/lib/rprompt/version.rb +1 -1
- metadata +2 -2
data/bin/rprompt
CHANGED
@@ -26,7 +26,18 @@ else
|
|
26
26
|
exit 1
|
27
27
|
end
|
28
28
|
|
29
|
-
|
29
|
+
dir = Dir.pwd
|
30
|
+
gitRepo = false
|
31
|
+
|
32
|
+
while dir != '/' do
|
33
|
+
if File.exists?("#{dir}/.git")
|
34
|
+
gitRepo = true
|
35
|
+
break
|
36
|
+
end
|
37
|
+
dir = File.expand_path('..', dir)
|
38
|
+
end
|
39
|
+
|
40
|
+
if gitRepo && gitConfig && gitLayout
|
30
41
|
if gitConfig[:status]
|
31
42
|
status = Rprompt::GitNumbers.new(gitConfig[:status].merge({:cmd => "git status -s"}))
|
32
43
|
else
|
data/lib/rprompt.rb
CHANGED
data/lib/rprompt/deco.rb
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
module Deco
|
2
|
+
# @param args [Hash]
|
3
|
+
# - :color: color [String]
|
4
|
+
# - :symbol: character [String]
|
5
|
+
# - :content: content [String]
|
6
|
+
# @return [String] colorized content string and symbol according to configuration
|
2
7
|
def termShow(args)
|
3
8
|
color = args[:color]
|
4
9
|
symbol = args[:symbol]
|
data/lib/rprompt/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rprompt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|