pryline 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pryline.rb +49 -0
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e87928b336c07a89688bd40bbcc3b2b151f10c650542964bb5577ddbc23c554f
|
4
|
+
data.tar.gz: 7974b43eb0a56435b2bbeb7079db7f196bdd9f505575af8de15ccf89461b593d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00df8a6a07c27e7e76a4c7f687461655135500d963a1413582e6f0e8bfe6a396ab04dd469a50bc3f421fa93bd4605fef2fb180fa258428f043723280647b82e9
|
7
|
+
data.tar.gz: fd3f44e02221234f23497a6e365d5311ce583a4e80f2e4066909f9a50893e2f9c51599cfaf2bbf52ba4b5bbbbf45dccb5787624d85ae22e1a18b4438b23ed1ec
|
data/lib/pryline.rb
CHANGED
@@ -61,6 +61,55 @@ module Pryline
|
|
61
61
|
accept_line.call(1, "\n".ord)
|
62
62
|
end
|
63
63
|
|
64
|
+
# previous line
|
65
|
+
previous_line = Fiddle::Function.new(
|
66
|
+
libreadline['rl_previous_screen_line'],
|
67
|
+
[Fiddle::TYPE_INT, Fiddle::TYPE_INT],
|
68
|
+
Fiddle::TYPE_INT
|
69
|
+
)
|
70
|
+
Pryline.define_singleton_method(:previous_line) do
|
71
|
+
previous_line.call(1, "f".ord)
|
72
|
+
end
|
73
|
+
|
74
|
+
# next line
|
75
|
+
next_line = Fiddle::Function.new(
|
76
|
+
libreadline['rl_next_screen_line'],
|
77
|
+
[Fiddle::TYPE_INT, Fiddle::TYPE_INT],
|
78
|
+
Fiddle::TYPE_INT
|
79
|
+
)
|
80
|
+
Pryline.define_singleton_method(:next_line) do
|
81
|
+
next_line.call(1, "f".ord)
|
82
|
+
end
|
83
|
+
|
84
|
+
# next history
|
85
|
+
next_history = Fiddle::Function.new(
|
86
|
+
libreadline['rl_get_next_history'],
|
87
|
+
[Fiddle::TYPE_INT, Fiddle::TYPE_INT],
|
88
|
+
Fiddle::TYPE_INT
|
89
|
+
)
|
90
|
+
Pryline.define_singleton_method(:next_history) do
|
91
|
+
next_history.call(1, "f".ord)
|
92
|
+
end
|
93
|
+
|
94
|
+
# previous history
|
95
|
+
previous_history = Fiddle::Function.new(
|
96
|
+
libreadline['rl_get_previous_history'],
|
97
|
+
[Fiddle::TYPE_INT, Fiddle::TYPE_INT],
|
98
|
+
Fiddle::TYPE_INT
|
99
|
+
)
|
100
|
+
Pryline.define_singleton_method(:previous_history) do
|
101
|
+
previous_history.call(1, "f".ord)
|
102
|
+
end
|
103
|
+
|
104
|
+
where_history = Fiddle::Function.new(
|
105
|
+
libreadline['where_history'],
|
106
|
+
[Fiddle::TYPE_VOID],
|
107
|
+
Fiddle::TYPE_INT
|
108
|
+
)
|
109
|
+
Pryline.define_singleton_method(:where_history) do
|
110
|
+
where_history.call(nil)
|
111
|
+
end
|
112
|
+
|
64
113
|
# null function
|
65
114
|
null_function = Fiddle::Function.new(
|
66
115
|
libreadline['_rl_null_function'],
|
data/lib/version.rb
CHANGED