shells 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/shells/shell_base.rb +5 -1
- data/lib/shells/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfc638465094c9b38eff3fb75fc5325cb7601810
|
4
|
+
data.tar.gz: '094972dd5fa27394b26e953251eea3ea87ff84f1'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad2255fc5b7d41ebf1d99804d6ba9be36f989e8268024f7c5f08d6ea0e0fb79d93fcbdf062210ec5568ac37ecb00d493237a745f44bf15465f685cdd150c7094
|
7
|
+
data.tar.gz: 1667f0e51d0464bd0b2a90d9c5f2762ae191d5a550c0bfacab8b2077de360447b3312d08f498ef27101ba25df90405ce7f68cd80da5f25a0937a3338c699efe9
|
data/lib/shells/shell_base.rb
CHANGED
@@ -841,18 +841,22 @@ module Shells
|
|
841
841
|
|
842
842
|
def regex_escape(text)
|
843
843
|
text
|
844
|
+
.gsub('\\', '\\\\')
|
844
845
|
.gsub('[', '\\[')
|
846
|
+
.gsub(']', '\\]')
|
845
847
|
.gsub('(', '\\(')
|
848
|
+
.gsub(')', '\\)')
|
846
849
|
.gsub('.', '\\.')
|
847
850
|
.gsub('*', '\\*')
|
848
851
|
.gsub('{', '\\{')
|
852
|
+
.gsub('}', '\\}')
|
849
853
|
.gsub('?', '\\?')
|
850
854
|
end
|
851
855
|
|
852
856
|
def command_match(command)
|
853
857
|
p = regex_escape @options[:prompt]
|
854
858
|
c = regex_escape command
|
855
|
-
/\A(?:#{p}\s*)?#{c}[ \t]*\
|
859
|
+
/\A(?:#{p}\s*)?#{c}[ \t]*\z/
|
856
860
|
end
|
857
861
|
|
858
862
|
def prompt_match
|
data/lib/shells/version.rb
CHANGED