hiiro 0.1.308 → 0.1.309
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/CHANGELOG.md +8 -0
- data/bin/h-link +30 -2
- data/lib/hiiro/version.rb +1 -1
- data/lib/hiiro.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 64fee11a94745ab455e4a3681d71b101db2319eb1def5ab5fc884191e5289bb2
|
|
4
|
+
data.tar.gz: 4508a89bfc1a9a0ce5570820346db8fa09434b62e8b21c8b83ee9fa6bd384a10
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d0a2039f5a8c1717c94bfcf010d8b59629666eb15a03316f7d9a07be5aacdff4d6a1becca8f0f03079a4a46e6a7ac850a9a3283008ccf3cc905ba98a89fa98f4
|
|
7
|
+
data.tar.gz: 76cd5e53ff951e720b2544c01653766573e61b132eab4499c3b0e95a5d10707a61ac7fffde7d4a266b1896627cab6d57198eb99aa7896f2ef7103bececa2f357
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
```markdown
|
|
2
2
|
# Changelog
|
|
3
3
|
|
|
4
|
+
## [0.1.309] - 2026-03-31
|
|
5
|
+
|
|
6
|
+
### Added
|
|
7
|
+
- `h link tag` support for tagging links in the link manager
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- Correct argument passing in `run_child` to prevent arg dropping in nested Hiiro instances
|
|
11
|
+
|
|
4
12
|
## [0.1.308] - 2026-03-31
|
|
5
13
|
|
|
6
14
|
### Added
|
data/bin/h-link
CHANGED
|
@@ -8,7 +8,9 @@ require 'tempfile'
|
|
|
8
8
|
require "hiiro"
|
|
9
9
|
|
|
10
10
|
opts = Hiiro::Options.setup {
|
|
11
|
-
option(:shorthand, short: :s)
|
|
11
|
+
option(:shorthand, short: :s, desc: 'Shorthand alias for the link')
|
|
12
|
+
option(:tag, short: :t, multi: true, desc: 'Tag for the link (repeatable)')
|
|
13
|
+
option(:tags, multi: true, desc: 'Tag for the link (alias for --tag, repeatable)')
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
class LinkManager
|
|
@@ -262,7 +264,8 @@ Hiiro.run(*ARGV, plugins: [Pins], links_file: lm.links_file) do
|
|
|
262
264
|
|
|
263
265
|
url = add_args.shift
|
|
264
266
|
vals = opts.parse!(add_args)
|
|
265
|
-
description =
|
|
267
|
+
description = vals.args.join(' ')
|
|
268
|
+
tags = (Array(vals.tag) + Array(vals.tags)).uniq.reject(&:empty?)
|
|
266
269
|
|
|
267
270
|
new_link = Hiiro::Link.create(
|
|
268
271
|
url: url,
|
|
@@ -270,6 +273,7 @@ Hiiro.run(*ARGV, plugins: [Pins], links_file: lm.links_file) do
|
|
|
270
273
|
shorthand: vals.shorthand,
|
|
271
274
|
created_at: Time.now.iso8601
|
|
272
275
|
)
|
|
276
|
+
Hiiro::Tag.tag!(new_link, *tags) if tags.any?
|
|
273
277
|
lm.save_yaml_backup
|
|
274
278
|
|
|
275
279
|
puts "Saved link ##{Hiiro::Link.count}: #{url}"
|
|
@@ -472,6 +476,30 @@ Hiiro.run(*ARGV, plugins: [Pins], links_file: lm.links_file) do
|
|
|
472
476
|
system('open', url)
|
|
473
477
|
end
|
|
474
478
|
|
|
479
|
+
add_subcmd(:paste) do |*paste_args|
|
|
480
|
+
url = `pbpaste`.strip
|
|
481
|
+
|
|
482
|
+
if url.empty?
|
|
483
|
+
puts "Clipboard is empty."
|
|
484
|
+
exit 1
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
vals = opts.parse!(paste_args)
|
|
488
|
+
description = vals.args.join(' ')
|
|
489
|
+
tags = (Array(vals.tag) + Array(vals.tags)).uniq.reject(&:empty?)
|
|
490
|
+
|
|
491
|
+
new_link = Hiiro::Link.create(
|
|
492
|
+
url: url,
|
|
493
|
+
description: description,
|
|
494
|
+
shorthand: vals.shorthand,
|
|
495
|
+
created_at: Time.now.iso8601
|
|
496
|
+
)
|
|
497
|
+
Hiiro::Tag.tag!(new_link, *tags) if tags.any?
|
|
498
|
+
lm.save_yaml_backup
|
|
499
|
+
|
|
500
|
+
puts "Saved link ##{Hiiro::Link.count}: #{url}"
|
|
501
|
+
end
|
|
502
|
+
|
|
475
503
|
add_subcmd(:path) do |*path_args|
|
|
476
504
|
print lm.links_file
|
|
477
505
|
end
|
data/lib/hiiro/version.rb
CHANGED
data/lib/hiiro.rb
CHANGED
|
@@ -229,7 +229,7 @@ class Hiiro
|
|
|
229
229
|
block.arity == 1 ? block.call(h) : h.instance_eval(&block) if block
|
|
230
230
|
end
|
|
231
231
|
|
|
232
|
-
Hiiro.init(
|
|
232
|
+
Hiiro.init(child_bin_name, *child_args, **kwargs, &wrapper)
|
|
233
233
|
end
|
|
234
234
|
|
|
235
235
|
def run_child(custom_subcmd=nil, custom_args=nil, **kwargs, &block)
|