tty2-reader 0.9.0.1 → 0.9.0.2

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
  SHA256:
3
- metadata.gz: a44587ade2b8c04804f0af10d8254767432ef48fbf44b846b6139b71ec2bcd66
4
- data.tar.gz: 419ad00150ac5a27e006fd193483a1babdc7ccc81d5045e9e45586879803bb05
3
+ metadata.gz: 602c87e30c4416077e84bc08207d5138250c63207da0e70a6da55320b1800f31
4
+ data.tar.gz: 30d5e3a3ea92318c774d6983b645c85d43f54ec53b5ac43e8df18d7ce0d651b8
5
5
  SHA512:
6
- metadata.gz: 2aefc8c61704b430c04380ffc70317d3770578736d5596120d5a0459c1f28fd7dfea83922fc6bf0625d87ab7989f20eb870cb3475b6b2460bde9a08ca1ae7d1d
7
- data.tar.gz: df40cf0b823f887d94a569568121363738b655afd127b0e6e21d9f8e4f2c258a3b12af72f61f3894c8c1f4ce38a659e85e4ea27b6fd4546e440a46f8f8d1235c
6
+ metadata.gz: ca7eb534f55eb6dba4507bca95829fc185e5b080a528eecb9da3d4d124877c63cefe57d62ff15276799e36c6b53748743fff0d6eb73130715f3d741273fb17ab
7
+ data.tar.gz: 7f1e1d9955be5880b55a46fabe62286778acbac5484384a450652c1a319aad3b31cfa4cc01b5c7c5dae5b11371b556dd852b27652d9bc4640971a17a7a5499b0
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Change log
2
2
 
3
- ## [v0.9.0] - unreleased
3
+ ## [v0.9.0.2] - 2022-02-02
4
+
5
+ ### Fix
6
+ * Fixed incorrect context determination in completer
7
+
8
+
9
+ ## [v0.9.0.1] - 2021-12-13
4
10
 
5
11
  ### Added
6
12
  * Added word completion
@@ -12,4 +18,5 @@
12
18
  ### Fix
13
19
 
14
20
 
15
- [v0.9.0]: https://github.com/zzyzwicz/tty2-reader/compare/v0.9.0
21
+ [v0.9.0.2]: https://github.com/zzyzwicz/tty2-reader/compare/v0.9.0.2
22
+ [v0.9.0.1]: https://github.com/zzyzwicz/tty2-reader/compare/v0.9.0.1
data/LICENSE.txt CHANGED
@@ -1,6 +1,7 @@
1
- The MIT License (MIT)
1
+ Copyright for portions of project TTY2::Reader are held by Piotr Murach, 2017 as part of project TTY::Reader.
2
+ All other copyright for project TTY2::Reader are held by zzyzwicz, 2021.
2
3
 
3
- Copyright (c) 2017 Piotr Murach (https://piotrmurach.com)
4
+ The MIT License (MIT)
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -2,9 +2,10 @@
2
2
  # TTY2::Reader
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/tty2-reader.svg)][gem]
5
- [![Build status](https://ci.appveyor.com/api/projects/status/cj4owy2vlty2q1ko?svg=true)][appveyor]
5
+ [![Build status](https://ci.appveyor.com/api/projects/status/d7o7e3hqq0d290n4?svg=true)][appveyor]
6
6
 
7
7
  [gem]: http://badge.fury.io/rb/tty2-reader
8
+ [appveyor]: https://ci.appveyor.com/project/zzyzwicz/tty2-reader
8
9
  [gh_actions_ci]: https://github.com/zzyzwicz/tty2-reader/actions?query=workflow%3ACI
9
10
 
10
11
  > A tty-reader fork with the objective of adding a customized word completion mechanism.
@@ -117,4 +118,5 @@ Everyone interacting in the TTY2::Reader project’s codebases, issue trackers,
117
118
 
118
119
  ## Copyright
119
120
 
120
- Copyright (c) 2021 zzyzwicz. See LICENSE for further details.
121
+ Copyright for portions of project TTY2::Reader are held by Piotr Murach, 2017 as part of project TTY::Reader.
122
+ All other copyright for project TTY2::Reader are held by zzyzwicz, 2021.
@@ -130,7 +130,7 @@ module TTY2
130
130
  # @api public
131
131
  def load_completions(line)
132
132
  @word = line.word_to_complete
133
- context = line.subtext[0..-@word.length]
133
+ context = line.subtext[0, line.word_start_pos]
134
134
  suggestions = handler.(word, context)
135
135
  suggestions = suggestions.grep(/^#{Regexp.escape(@word)}/)
136
136
  completions.clear
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TTY2
4
4
  class Reader
5
- VERSION = "0.9.0.1"
5
+ VERSION = "0.9.0.2"
6
6
  end # Reader
7
7
  end # TTY2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tty2-reader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0.1
4
+ version: 0.9.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - zzyzwicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-13 00:00:00.000000000 Z
11
+ date: 2022-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-screen