snibbets 2.0.35 → 2.0.37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -295
- data/Gemfile.lock +7 -7
- data/README.md +1 -3
- data/lib/snibbets/highlight.rb +0 -1
- data/lib/snibbets/menu.rb +1 -1
- data/lib/snibbets/string.rb +1 -1
- data/lib/snibbets/version.rb +1 -1
- data/lib/snibbets.rb +1 -1
- data/snibbets.gemspec +2 -2
- data/src/_README.md +1 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c4679a3bc38da47aa45d83f80813da7fc15ab4c6ce543c262054e118fc28a15
|
4
|
+
data.tar.gz: b902be45475479939390cf651b6c405ff692ca397bde731f2314a50c2ab02218
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 466cdfa3acd6966e3942ab2a9d598132bb23833b85c7a293443b9346c5744b96d93a14d0858f489989e6e82e43dcd493c2404ecb25873a3e882912bbe624b644
|
7
|
+
data.tar.gz: 69e63c3bf7aa31587f37956b4c8a370e663199292d3b7b21fb59298400887b4e4c441f22939d5e1de0048e8bba7f892d4d545e0b635050a306fb244e7a4c1148
|
data/CHANGELOG.md
CHANGED
@@ -1,301 +1,12 @@
|
|
1
|
-
### 2.0.
|
1
|
+
### 2.0.36
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
#### FIXED
|
6
|
-
|
7
|
-
- Mdfind returns nil on linux
|
8
|
-
|
9
|
-
### 2.0.34
|
10
|
-
|
11
|
-
2023-06-17 09:17
|
12
|
-
|
13
|
-
#### IMPROVED
|
14
|
-
|
15
|
-
- If a section of a snippet contains no code blocks, output the whole thing
|
16
|
-
|
17
|
-
#### FIXED
|
18
|
-
|
19
|
-
- Correct error if searching name only and no results are returned
|
20
|
-
|
21
|
-
### 2.0.33
|
22
|
-
|
23
|
-
2023-04-26 10:23
|
24
|
-
|
25
|
-
#### IMPROVED
|
26
|
-
|
27
|
-
- More coloring for prompts and messages
|
28
|
-
- Colorize headers in multi-snippet output
|
29
|
-
- If skylighting highlighting is enabled and the specified
|
30
|
-
- Add some normalization for some skylighting lexers
|
31
|
-
|
32
|
-
#### FIXED
|
33
|
-
|
34
|
-
- Highlighting returns empty if language contains non-alphanumeric characters
|
35
|
-
|
36
|
-
### 2.0.32
|
37
|
-
|
38
|
-
2023-04-25 17:14
|
39
|
-
|
40
|
-
#### FIXED
|
41
|
-
|
42
|
-
- Don't highlight code sent to `--copy`
|
43
|
-
|
44
|
-
### 2.0.31
|
45
|
-
|
46
|
-
2023-04-20 10:20
|
47
|
-
|
48
|
-
#### IMPROVED
|
49
|
-
|
50
|
-
- Syntax highlight blocks individually, so multiple languages can exist within one snippet
|
51
|
-
- If outputting notes, wrap code in backticks to differentiate
|
52
|
-
|
53
|
-
#### FIXED
|
54
|
-
|
55
|
-
- Handle cases where snippet contains `\k<name>` and breaks regex replacement even with Regexp.escape
|
56
|
-
- Remove fences from single snippet when not syntax highlighting
|
57
|
-
|
58
|
-
### 2.0.30
|
59
|
-
|
60
|
-
2023-04-19 06:44
|
61
|
-
|
62
|
-
#### NEW
|
63
|
-
|
64
|
-
- Added `--notes` option and accompanying `all_notes` config option to allow display of all notes instead of just code blocks in each snippet
|
65
|
-
|
66
|
-
#### IMPROVED
|
67
|
-
|
68
|
-
- Previously if multiple snippets were output, titles of snippets would go to STDERR so they weren't copied. Now they go to STDOUT as well.
|
69
|
-
|
70
|
-
### 2.0.29
|
71
|
-
|
72
|
-
2023-04-18 10:45
|
73
|
-
|
74
|
-
#### IMPROVED
|
75
|
-
|
76
|
-
- Better removal of extra leading/trailing newlines
|
77
|
-
|
78
|
-
#### FIXED
|
79
|
-
|
80
|
-
- Selecting 'All snippets' could return blank results in some cases
|
81
|
-
|
82
|
-
### 2.0.28
|
83
|
-
|
84
|
-
2023-04-18 09:18
|
85
|
-
|
86
|
-
#### FIXED
|
87
|
-
|
88
|
-
- When detecting indented code blocks, require a blank line (or start of file) before them, to avoid picking up lines within indented lists
|
89
|
-
|
90
|
-
### 2.0.26
|
91
|
-
|
92
|
-
2023-04-16 11:18
|
93
|
-
|
94
|
-
#### FIXED
|
95
|
-
|
96
|
-
- Nil error when highlighting without extension
|
97
|
-
|
98
|
-
### 2.0.24
|
99
|
-
|
100
|
-
2023-04-16 10:49
|
101
|
-
|
102
|
-
#### NEW
|
103
|
-
|
104
|
-
- `--nvultra` will open the selected snippet in nvUltra
|
105
|
-
|
106
|
-
#### IMPROVED
|
107
|
-
|
108
|
-
- Use Readline for entering info with `--paste`, allows for better editing experience
|
109
|
-
- Allow `--edit` with `--paste` to open the new snippet in your editor immediately
|
110
|
-
|
111
|
-
#### FIXED
|
112
|
-
|
113
|
-
- Code indentation with `--paste`
|
114
|
-
|
115
|
-
### 2.0.23
|
116
|
-
|
117
|
-
2023-04-16 10:33
|
118
|
-
|
119
|
-
#### IMPROVED
|
120
|
-
|
121
|
-
- Use Readline for entering info with `--paste`, allows for better editing experience
|
122
|
-
- Allow `--edit` with `--paste` to open the new snippet in your editor immediately
|
123
|
-
|
124
|
-
#### FIXED
|
125
|
-
|
126
|
-
- Code indentation with `--paste`
|
127
|
-
|
128
|
-
### 2.0.22
|
129
|
-
|
130
|
-
2023-04-16 09:33
|
131
|
-
|
132
|
-
#### IMPROVED
|
133
|
-
|
134
|
-
- Use Readline for entering info with `--paste`, allows for better editing experience
|
135
|
-
|
136
|
-
#### FIXED
|
137
|
-
|
138
|
-
- Code indentation with `--paste`
|
139
|
-
|
140
|
-
### 2.0.21
|
141
|
-
|
142
|
-
2023-04-16 09:04
|
143
|
-
|
144
|
-
#### IMPROVED
|
145
|
-
|
146
|
-
- Use leading and trailing hashes to make snippet titles more obvious when outputting All Snippets
|
147
|
-
|
148
|
-
### 2.0.20
|
149
|
-
|
150
|
-
2023-04-16 08:31
|
151
|
-
|
152
|
-
#### FIXED
|
153
|
-
|
154
|
-
- Fail to include skylighting themes in gem bundle
|
155
|
-
- Failure to recognize fenced code blocks with language specifiers containing hyphens
|
156
|
-
|
157
|
-
### 2.0.19
|
158
|
-
|
159
|
-
2023-04-16 08:05
|
160
|
-
|
161
|
-
#### FIXED
|
162
|
-
|
163
|
-
- A fenced code block following a line containing only 4+ spaces or tabs would get parsed as an indented code block
|
164
|
-
- Last fenced code block in a snippet might not be recognized
|
165
|
-
|
166
|
-
### 2.0.18
|
167
|
-
|
168
|
-
2023-04-16 06:57
|
169
|
-
|
170
|
-
#### FIXED
|
171
|
-
|
172
|
-
- If an invalid language (without a lexer) is supplied when using `--paste`, just use the input as the extension and tag
|
173
|
-
|
174
|
-
### 2.0.17
|
175
|
-
|
176
|
-
2023-04-16 06:31
|
177
|
-
|
178
|
-
#### NEW
|
179
|
-
|
180
|
-
- Languages specified in the opening fence of a code block are passed to the syntax highlighter (only affects Skylighting)
|
181
|
-
|
182
|
-
#### IMPROVED
|
183
|
-
|
184
|
-
- Add all available themes for Skylighting
|
185
|
-
- Allow a custom theme path to be provided for Skylighting by including a path in `highlight_theme` config
|
186
|
-
- Handle syntax highlighter errors, returning plain code if command fails
|
187
|
-
|
188
|
-
#### FIXED
|
189
|
-
|
190
|
-
- Disable syntax highlighting when command is being piped or redirected
|
191
|
-
- Don't syntax highlight clipboard code when using `--copy`
|
192
|
-
|
193
|
-
### 2.0.16
|
194
|
-
|
195
|
-
2023-04-15 22:15
|
196
|
-
|
197
|
-
#### FIXED
|
198
|
-
|
199
|
-
- Remove debugging output
|
200
|
-
|
201
|
-
### 2.0.15
|
202
|
-
|
203
|
-
2023-04-15 22:11
|
204
|
-
|
205
|
-
#### NEW
|
206
|
-
|
207
|
-
- Additional themes for skylighting: nord, monokai, solarized-light/dark
|
208
|
-
|
209
|
-
#### FIXED
|
210
|
-
|
211
|
-
- Bad path to highlighter themes for skylighting
|
212
|
-
|
213
|
-
### 2.0.14
|
214
|
-
|
215
|
-
2023-04-15 21:21
|
216
|
-
|
217
|
-
#### IMPROVED
|
218
|
-
|
219
|
-
- Better default themes for highlighters
|
220
|
-
|
221
|
-
#### FIXED
|
222
|
-
|
223
|
-
- Error with lexers_db when using higlighting
|
224
|
-
|
225
|
-
### 2.0.13
|
226
|
-
|
227
|
-
2023-04-15 19:57
|
228
|
-
|
229
|
-
#### NEW
|
230
|
-
|
231
|
-
- Option to include blockquotes (>) in output
|
232
|
-
|
233
|
-
### 2.0.12
|
234
|
-
|
235
|
-
2023-04-15 19:28
|
236
|
-
|
237
|
-
#### FIXED
|
238
|
-
|
239
|
-
- Lowered minimum ruby version to allow Ruby 2.6
|
240
|
-
- Failure to recognize snippet if title is on first line of file
|
241
|
-
- Errantly discarding first snippet in file with multiple snippets
|
242
|
-
|
243
|
-
### 2.0.11
|
244
|
-
|
245
|
-
2023-04-15 19:06
|
246
|
-
|
247
|
-
#### FIXED
|
248
|
-
|
249
|
-
- Overactive stripping of newlines within code blocks
|
250
|
-
- Syntax definition determination when adding new snippets
|
251
|
-
|
252
|
-
### 2.0.10
|
253
|
-
|
254
|
-
2023-04-15 16:28
|
255
|
-
|
256
|
-
#### FIXED
|
257
|
-
|
258
|
-
- Update dependencies for security
|
259
|
-
- Incorporate fixes from @robjwells addressing #3 and #4
|
260
|
-
- Incorporate fixes from @robjwells addressing #3 and #4
|
261
|
-
- Best menu CLI determination missing modules
|
262
|
-
|
263
|
-
### 2.0.9
|
264
|
-
|
265
|
-
2023-04-15 15:44
|
266
|
-
|
267
|
-
#### IMPROVED
|
268
|
-
|
269
|
-
- Allow setting `menus` config key to force Snibbets to use fzf, gum, or console menus
|
270
|
-
- Allow setting `menus` config key to force Snibbets to use fzf, gum, or console menus
|
271
|
-
|
272
|
-
#### FIXED
|
273
|
-
|
274
|
-
- If a header section contains no code blocks, don't display it in menu
|
275
|
-
- Remove leading and trailing newlines without affecting indentation
|
276
|
-
|
277
|
-
### 2.0.8
|
278
|
-
|
279
|
-
2023-04-15 15:41
|
280
|
-
|
281
|
-
#### IMPROVED
|
282
|
-
|
283
|
-
- Allow setting `menus` config key to force Snibbets to use fzf, gum, or console menus
|
284
|
-
- Allow setting `menus` config key to force Snibbets to use fzf, gum, or console menus
|
285
|
-
|
286
|
-
#### FIXED
|
287
|
-
|
288
|
-
- If a header section contains no code blocks, don't display it in menu
|
289
|
-
- Remove leading and trailing newlines without affecting indentation
|
290
|
-
|
291
|
-
### 2.0.6
|
292
|
-
|
293
|
-
2023-04-15 11:55
|
3
|
+
2024-04-08 14:25
|
294
4
|
|
295
5
|
#### IMPROVED
|
296
6
|
|
297
|
-
-
|
7
|
+
- Use name: instead of filename: for limiting by extension,
|
8
|
+
- Remove tag: from searches when resorting to find or grep
|
298
9
|
|
299
|
-
###
|
10
|
+
### 1.0.0
|
300
11
|
|
301
|
-
|
12
|
+
2023-09-05 16:46
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
snibbets (2.0.
|
4
|
+
snibbets (2.0.37)
|
5
5
|
mdless (~> 1.0, >= 1.0.32)
|
6
6
|
tty-reader (~> 0.9, >= 0.9.0)
|
7
7
|
tty-which (~> 0.5, >= 0.5.0)
|
@@ -18,7 +18,7 @@ GEM
|
|
18
18
|
json (2.6.3)
|
19
19
|
language_server-protocol (3.17.0.3)
|
20
20
|
lint_roller (1.0.0)
|
21
|
-
mdless (1.0.
|
21
|
+
mdless (1.0.37)
|
22
22
|
multi_json (1.15.0)
|
23
23
|
parallel (1.23.0)
|
24
24
|
parse_gemspec (1.0.0)
|
@@ -32,7 +32,7 @@ GEM
|
|
32
32
|
racc (1.7.1)
|
33
33
|
rainbow (3.1.1)
|
34
34
|
rake (13.0.6)
|
35
|
-
rdoc (6.3.
|
35
|
+
rdoc (6.3.4.1)
|
36
36
|
regexp_parser (2.8.1)
|
37
37
|
rexml (3.2.5)
|
38
38
|
rspec (3.12.0)
|
@@ -93,11 +93,11 @@ GEM
|
|
93
93
|
tty-cursor (~> 0.7)
|
94
94
|
tty-screen (~> 0.8)
|
95
95
|
wisper (~> 2.0)
|
96
|
-
tty-screen (0.8.
|
96
|
+
tty-screen (0.8.2)
|
97
97
|
tty-which (0.5.0)
|
98
98
|
unicode-display_width (2.4.2)
|
99
99
|
wisper (2.0.1)
|
100
|
-
yard (0.9.
|
100
|
+
yard (0.9.36)
|
101
101
|
|
102
102
|
PLATFORMS
|
103
103
|
arm64-darwin-20
|
@@ -113,13 +113,13 @@ DEPENDENCIES
|
|
113
113
|
gem-release (~> 2.2)
|
114
114
|
parse_gemspec-cli (~> 1.0)
|
115
115
|
rake (~> 13.0)
|
116
|
-
rdoc (~> 6.3.1)
|
116
|
+
rdoc (~> 6.3.4.1)
|
117
117
|
rspec (~> 3.0)
|
118
118
|
simplecov (~> 0.21)
|
119
119
|
simplecov-console (~> 0.9)
|
120
120
|
snibbets!
|
121
121
|
standard (~> 1.3)
|
122
|
-
yard (~> 0.9, >= 0.9.
|
122
|
+
yard (~> 0.9, >= 0.9.36)
|
123
123
|
|
124
124
|
BUNDLED WITH
|
125
125
|
2.2.29
|
data/README.md
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
|
2
|
-
|
3
2
|
[![RubyGems.org](https://img.shields.io/gem/v/snibbets)](https://rubygems.org/gems/snibbets)
|
4
|
-
<!-- [![GitHub Actions](https://github.com/ttscoff/snibbets/actions/workflows/check.yml/badge.svg)](https://github.com/ttscoff/snibbets/actions/workflows/check.yml) -->
|
5
3
|
|
6
4
|
A tool for accessing code snippets contained in a folder of plain text Markdown files.
|
7
5
|
|
@@ -159,7 +157,7 @@ Snibbet's implementation of Skylighting has limited but better-looking themes, a
|
|
159
157
|
### Usage
|
160
158
|
|
161
159
|
```
|
162
|
-
Snibbets v2.0.
|
160
|
+
Snibbets v2.0.37
|
163
161
|
|
164
162
|
Usage: snibbets [options] query
|
165
163
|
-a, --all If a file contains multiple snippets, output all of them (no menu)
|
data/lib/snibbets/highlight.rb
CHANGED
data/lib/snibbets/menu.rb
CHANGED
@@ -52,7 +52,7 @@ module Snibbets
|
|
52
52
|
options = res.map { |m| "#{filename}: #{m['title']}" }
|
53
53
|
q = query.nil? ? '' : find_query_in_options(filename, res, query)
|
54
54
|
args = [
|
55
|
-
"--height=#{options.count +
|
55
|
+
"--height=#{options.count + 3}",
|
56
56
|
%(--prompt="#{title} > "),
|
57
57
|
'-1',
|
58
58
|
%(--header="#{filename}"),
|
data/lib/snibbets/string.rb
CHANGED
data/lib/snibbets/version.rb
CHANGED
data/lib/snibbets.rb
CHANGED
@@ -78,7 +78,7 @@ module Snibbets
|
|
78
78
|
nil
|
79
79
|
else
|
80
80
|
name_only = Snibbets.options[:name_only] ? '-name ' : ''
|
81
|
-
%(mdfind -onlyin #{folder} #{name_only}'#{@query}
|
81
|
+
%(mdfind -onlyin #{folder} #{name_only}'#{@query} name:.#{ext}' 2>/dev/null)
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
data/snibbets.gemspec
CHANGED
@@ -36,8 +36,8 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency "gem-release", "~> 2.2"
|
37
37
|
spec.add_development_dependency "parse_gemspec-cli", "~> 1.0"
|
38
38
|
spec.add_development_dependency "rake", "~> 13.0"
|
39
|
-
spec.add_development_dependency 'rdoc', '~> 6.3.1'
|
40
|
-
spec.add_development_dependency 'yard', '~> 0.9', '>= 0.9.
|
39
|
+
spec.add_development_dependency 'rdoc', '~> 6.3.4.1'
|
40
|
+
spec.add_development_dependency 'yard', '~> 0.9', '>= 0.9.36'
|
41
41
|
spec.add_development_dependency "rspec", "~> 3.0"
|
42
42
|
spec.add_development_dependency "simplecov", "~> 0.21"
|
43
43
|
spec.add_development_dependency "simplecov-console", "~> 0.9"
|
data/src/_README.md
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
# Snibbets
|
2
2
|
|
3
3
|
<!--README-->
|
4
|
-
<!--GITHUB-->
|
5
4
|
[![RubyGems.org](https://img.shields.io/gem/v/snibbets)](https://rubygems.org/gems/snibbets)
|
6
|
-
|
7
|
-
<!--END GITHUB-->
|
5
|
+
|
8
6
|
A tool for accessing code snippets contained in a folder of plain text Markdown files.
|
9
7
|
|
10
8
|
Snibbets allows me to keep code snippets in raw files, not relying on a dedicated code snippet app. I can collect and edit my snippets using a text editor, nvALT (nvUltra), or simply by saving snippets from my clipboard to a text file using *NIX redirection on the command line. I can add descriptive names and extended descriptions/notes to code snippets using standard Markdown.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snibbets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.37
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 6.3.1
|
89
|
+
version: 6.3.4.1
|
90
90
|
type: :development
|
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: 6.3.1
|
96
|
+
version: 6.3.4.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: yard
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,7 +103,7 @@ dependencies:
|
|
103
103
|
version: '0.9'
|
104
104
|
- - ">="
|
105
105
|
- !ruby/object:Gem::Version
|
106
|
-
version: 0.9.
|
106
|
+
version: 0.9.36
|
107
107
|
type: :development
|
108
108
|
prerelease: false
|
109
109
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -113,7 +113,7 @@ dependencies:
|
|
113
113
|
version: '0.9'
|
114
114
|
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 0.9.
|
116
|
+
version: 0.9.36
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: rspec
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|