snibbets 2.0.35 → 2.0.36

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: 52a6ea620e56135407c912002d9a91e4892ca290beefb8acc9f48322b3fe0ac4
4
- data.tar.gz: 9048ea2234f47fc0d514a885ae8f3bfb9a763e3de7e6ec3be1c7c4986b5298da
3
+ metadata.gz: 8af73f9a7562bdf02e3219d15befffbee9c105181469502bec9fa4901bfbb26c
4
+ data.tar.gz: c315a562318df15e8d577fcaf7912b8142c7697f7c31dc014c616bcfe1d5d869
5
5
  SHA512:
6
- metadata.gz: 11a0747b70dd570d10085fa9c3b722f9a56f49b24118c8b2236d0d5d6059c9137c51f364491093e4bfbec5c923b69bb032812e45e6ed96513a30e890c260110b
7
- data.tar.gz: e6e0f630d72e5095618fc97134bc647322328c17d14b781d4d921bcca60df681e8c2ad2e5a84ae1f8dcf23b3f25338f12eea95db8e1c2ca44e956784aa5828cc
6
+ metadata.gz: f50419c0a66be0d46c6edf7aebe94554fcbd6630e046ad2977dddbeec66bdd43387ea556583028aebbd00433e060656e16eae4b9715efaba28db476dc92c06b5
7
+ data.tar.gz: 6de5b9b12cee67ca033b75bd81c0c2930d4880ab21920dd86ffa4da2cbe989f654f48048d115a53128ad4c36fe6366fbce27b5605269129c3df3f513e994342e
data/CHANGELOG.md CHANGED
@@ -1,301 +1,12 @@
1
- ### 2.0.35
1
+ ### 2.0.36
2
2
 
3
- 2023-08-21 11:16
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
- - Refactor script as modules and classes
7
+ - Use name: instead of filename: for limiting by extension,
8
+ - Remove tag: from searches when resorting to find or grep
298
9
 
299
- ### 2.0.2
10
+ ### 1.0.0
300
11
 
301
- Initial release as a gem
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.35)
4
+ snibbets (2.0.36)
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)
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.35
160
+ Snibbets v2.0.36
163
161
 
164
162
  Usage: snibbets [options] query
165
163
  -a, --all If a file contains multiple snippets, output all of them (no menu)
@@ -2,7 +2,6 @@ module Snibbets
2
2
  module Highlight
3
3
  class << self
4
4
  def run_command_with_input(*cmd, input: nil, fallback: nil)
5
-
6
5
  stdout, _stderr, status = Open3.capture3(*cmd, stdin_data: input)
7
6
  if status.success?
8
7
  stdout
@@ -74,7 +74,7 @@ module Snibbets
74
74
  end
75
75
 
76
76
  def rx
77
- ".*#{gsub(/\s+/, '.*')}.*"
77
+ ".*#{gsub(/tags?:/, '').gsub(/\s+/, '.*')}.*"
78
78
  end
79
79
 
80
80
  # remove outside comments, fences, and indentation
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Snibbets
4
- VERSION = '2.0.35'
4
+ VERSION = '2.0.36'
5
5
  end
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} filename:.#{ext}' 2>/dev/null)
81
+ %(mdfind -onlyin #{folder} #{name_only}'#{@query} name:.#{ext}' 2>/dev/null)
82
82
  end
83
83
  end
84
84
 
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
- <!-- [![GitHub Actions](https://github.com/ttscoff/snibbets/actions/workflows/check.yml/badge.svg)](https://github.com/ttscoff/snibbets/actions/workflows/check.yml) -->
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.35
4
+ version: 2.0.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-21 00:00:00.000000000 Z
11
+ date: 2024-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler