shells 0.1.17 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2424a8d228c192d04bb67fd0da415c05279825df
4
- data.tar.gz: c519f8d880364c1460eff4b11dac8e94a4cc85f6
3
+ metadata.gz: dfc638465094c9b38eff3fb75fc5325cb7601810
4
+ data.tar.gz: '094972dd5fa27394b26e953251eea3ea87ff84f1'
5
5
  SHA512:
6
- metadata.gz: 0ba51eabac0d843acaab5c5be3e26db32dd8bed3766d991688c339cd737496b27ce937ab7d77bfb7ca91736a8e012b33b912e80cefba8e6c785ee2cc41659256
7
- data.tar.gz: b47145ec215f8edc35f9acce2664ee76982f7fd42da3ea55a260cbd421122980260664cc40167ce82f3a275c4eaf5cc4414ae79d3f90c8232b5b1ec58b5111a4
6
+ metadata.gz: ad2255fc5b7d41ebf1d99804d6ba9be36f989e8268024f7c5f08d6ea0e0fb79d93fcbdf062210ec5568ac37ecb00d493237a745f44bf15465f685cdd150c7094
7
+ data.tar.gz: 1667f0e51d0464bd0b2a90d9c5f2762ae191d5a550c0bfacab8b2077de360447b3312d08f498ef27101ba25df90405ce7f68cd80da5f25a0937a3338c699efe9
@@ -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]*\n?/m
859
+ /\A(?:#{p}\s*)?#{c}[ \t]*\z/
856
860
  end
857
861
 
858
862
  def prompt_match
@@ -1,3 +1,3 @@
1
1
  module Shells
2
- VERSION = "0.1.17"
2
+ VERSION = "0.1.18"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shells
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Beau Barker