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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 293e176ea2c898019b001c0db7277c079980b304b43199dc270d31d91a869cca
4
- data.tar.gz: c3b6118daf238da019e7f739b2b602d6eab1f6b643c18d3dfb6f502335887e4b
3
+ metadata.gz: 64fee11a94745ab455e4a3681d71b101db2319eb1def5ab5fc884191e5289bb2
4
+ data.tar.gz: 4508a89bfc1a9a0ce5570820346db8fa09434b62e8b21c8b83ee9fa6bd384a10
5
5
  SHA512:
6
- metadata.gz: d5878d6857a592da9b566b93eb8df31918196584e58c1f8ee4b637bbf281fbf0c8e72fd207d9751754eadadfbde8124d35c2b1f178bce9426d3809bfffe7494b
7
- data.tar.gz: 6217a52654077df7be803b923de5a87fb58efb3e0dce4ec51601e4cd040e98a2f911e70755ced173e5b3764de291acece7792259eb97ee1a19b76a3f04e4839a
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 = add_args.join(' ')
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
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.308"
2
+ VERSION = "0.1.309"
3
3
  end
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(bin_name: child_bin_name, args: child_args, **kwargs, &wrapper)
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiiro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.308
4
+ version: 0.1.309
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota