yap-shell 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -6
- data/addons/prompt/right_prompt.rb +7 -9
- data/addons/prompt_updates/prompt_updates.rb +24 -25
- data/bin/yap-dev +1 -0
- data/lib/yap/shell/evaluation.rb +0 -1
- data/lib/yap/shell/version.rb +1 -1
- data/yap-shell.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87a1ed22865947c8ef75b2a16007dc72270dab7a
|
4
|
+
data.tar.gz: 38e78b4b608f6ec74c922472d6e965ef0fcccd1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66989ed7684b9327859f04c655991b49bbeefeb83706bb14889395e32b75d08ad81a6858d780ac78ad75bb0fc1a35b3b99b8467eac1275d35a51bdca114a65a8
|
7
|
+
data.tar.gz: ed9d4d26e65195606b817ac1f6c46d7ac490cf147cb6e74471e7ce192f41c7e5082ffba2e58e931b61fa83013dfc5f1bcc14b46c39389d24ef4d93159a2cd645
|
data/Gemfile
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
# Specify your gem's dependencies in yap.gemspec
|
4
3
|
gemspec
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
|
5
|
+
gem 'treefell', path: '../treefell'
|
6
|
+
gem 'yap-shell-parser', path: '../yap-shell-parser'
|
7
|
+
gem 'terminal-layout', path: '../terminal-layout'
|
8
|
+
gem 'yap-rawline', path: '../yap-rawline'
|
@@ -6,14 +6,12 @@ class RightPrompt < Addon
|
|
6
6
|
def initialize_world(world)
|
7
7
|
@world = world
|
8
8
|
|
9
|
-
@world.subscribe(:refresh_right_prompt) do |event|
|
10
|
-
|
11
|
-
end
|
12
|
-
|
13
|
-
@world.events.recur(
|
14
|
-
|
15
|
-
|
16
|
-
source: self
|
17
|
-
)
|
9
|
+
# @world.subscribe(:refresh_right_prompt) do |event|
|
10
|
+
# @world.right_prompt_text = Time.now.strftime("%H:%M:%S")
|
11
|
+
# end
|
12
|
+
#
|
13
|
+
# @world.events.recur(
|
14
|
+
# name: "refresh_right_prompt", source: self, interval_in_ms: 1_000
|
15
|
+
# )
|
18
16
|
end
|
19
17
|
end
|
@@ -1,29 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
@world.refresh_prompt
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
1
|
+
class PromptUpdates < Addon
|
2
|
+
attr_reader :world
|
3
|
+
|
4
|
+
def initialize_world(world)
|
5
|
+
current_branch = determine_branch
|
6
|
+
|
7
|
+
@world = world
|
8
|
+
@world.events.recur(
|
9
|
+
name: 'prompt_updates',
|
10
|
+
source: self,
|
11
|
+
interval_in_ms: 100
|
12
|
+
) do
|
13
|
+
new_branch = determine_branch
|
14
|
+
if current_branch != new_branch
|
15
|
+
current_branch = new_branch
|
16
|
+
@world.refresh_prompt
|
21
17
|
end
|
18
|
+
end
|
22
19
|
|
23
|
-
|
20
|
+
end
|
24
21
|
|
25
|
-
|
26
|
-
`git branch 2>/dev/null`.scan(/\*\s*(.*)$/).flatten.first
|
27
|
-
end
|
22
|
+
private
|
28
23
|
|
29
|
-
|
24
|
+
def determine_branch
|
25
|
+
`git branch 2>/dev/null`.scan(/\*\s*(.*)$/).flatten.first
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
data/bin/yap-dev
CHANGED
data/lib/yap/shell/evaluation.rb
CHANGED
data/lib/yap/shell/version.rb
CHANGED
data/yap-shell.gemspec
CHANGED
@@ -69,7 +69,7 @@ Gem::Specification.new do |spec|
|
|
69
69
|
spec.add_dependency "term-ansicolor", "~> 1.3"
|
70
70
|
spec.add_dependency "ruby-termios", "~> 0.9.6"
|
71
71
|
spec.add_dependency "ruby-terminfo", "~> 0.1.1"
|
72
|
-
spec.add_dependency "yap-rawline", "~> 0.4.
|
72
|
+
spec.add_dependency "yap-rawline", "~> 0.4.1"
|
73
73
|
spec.add_dependency "treefell", "~> 0.2.3"
|
74
74
|
|
75
75
|
spec.add_development_dependency "bundler", "~> 1.6"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yap-shell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Dennis
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.4.
|
89
|
+
version: 0.4.1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.4.
|
96
|
+
version: 0.4.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: treefell
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|