hiiro 0.1.273 → 0.1.274

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: 4b55682a1256d90688f6471b9fd2ae9cd6d0c6ee716692d04d9c52123cc9f2ad
4
- data.tar.gz: ac10d9d826855e8eeb43ae48e33eff5b7f1af43fad6e12184334f8dff845d8eb
3
+ metadata.gz: 968d0614eee692c6d348a2211910eeefb781f4e824dd8e719367102ee89cbe4c
4
+ data.tar.gz: 6fc2f1664de12796a7f61649328229496bd5574b6904d1d60e8bff0f624b6aa3
5
5
  SHA512:
6
- metadata.gz: 2846d4b518bdeca084f38090a422e965f027c9df5bc90e8f39984781733227bcf7647ee9cfbba0213892ab406d90bf20f8f1155ee2d06195ddd325cb8278c611
7
- data.tar.gz: 5a35953c04c0f089d30b061835cc445b130801aaef4f4dcd28227376811dcb0bce7e4ead0bc8844da16f064d6bed4800873350a409c7ac50c73f7dc4daea2a4a
6
+ metadata.gz: 8f608df88299d10d6eb2540b35dbd4b257c75d66d422811d21fa49f1788067f32d6b1efa962b416edce2e22e3fdd4511aa60449b3c1532d778280cc674dc2eb5
7
+ data.tar.gz: 840833b88c1f9790332c49f408d7edd86dec32314e516c41252d946672806c4e4d81952a6f6689ec513930ff05f6fc8392d31aa3bc328aa300b3512dc268d96a
data/CHANGELOG.md CHANGED
@@ -1 +1 @@
1
- Done. CHANGELOG.md updated for v0.1.273 with today's date (2026-03-23). Changes grouped into Added and Changed sections based on the recent commits.
1
+ Done. The CHANGELOG.md has been updated with v0.1.274 entry at the top, grouping the recent changes into Added and Fixed sections with today's date.
data/bin/h-bg CHANGED
@@ -70,10 +70,10 @@ Hiiro.run(*ARGV) do
70
70
  end
71
71
 
72
72
  add_subcmd(:setup) do
73
- puts 'Add this to your tmux.conf:'
74
- puts
75
- puts " bind-key b display-popup -E -w 80% -h 40% \"h bg popup\""
76
- puts
77
- puts "Then reload tmux: tmux source-file ~/.tmux.conf"
73
+ $stderr.puts 'Add this to your tmux.conf:'
74
+ $stderr.puts
75
+ puts "bind-key b display-popup -E -w 80% -h 40% \"h bg popup\""
76
+ $stderr.puts
77
+ $stderr.puts "Then reload tmux: tmux source-file ~/.tmux.conf"
78
78
  end
79
79
  end
data/bin/h-pr CHANGED
@@ -515,6 +515,10 @@ class PinnedPRManager
515
515
  end
516
516
  end
517
517
 
518
+ def strip_ansi(str)
519
+ str.gsub(/\e\[[0-9;]*m/, '')
520
+ end
521
+
518
522
  def display_check_runs(pr, indent: " ")
519
523
  runs = pr.check_runs
520
524
  return unless runs.is_a?(Array) && runs.any?
@@ -574,7 +578,7 @@ FILTER_OPTS = Proc.new {
574
578
  flag(:red, short: 'r', desc: 'filter: failing checks')
575
579
  flag(:green, short: 'g', desc: 'filter: passing checks')
576
580
  flag(:conflicts, short: 'c', desc: 'filter: merge conflicts')
577
- flag(:drafts, short: 'd', desc: 'filter: draft PRs')
581
+ flag(:drafts, short: 'D', desc: 'filter: draft PRs')
578
582
  flag(:pending, short: 'p', desc: 'filter: pending checks')
579
583
  flag(:merged, short: 'm', desc: 'filter: merged PRs')
580
584
  flag(:active, short: 'o', desc: 'filter: open (non-merged) PRs')
@@ -593,7 +597,7 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
593
597
  return nil
594
598
  end
595
599
  lines = pinned.each_with_index.each_with_object({}) do |(pr, idx), h|
596
- h[pinned_manager.display_pinned(pr, idx, oneline: true)] = pr.number.to_s
600
+ h[pinned_manager.strip_ansi(pinned_manager.display_pinned(pr, idx, oneline: true))] = pr.number.to_s
597
601
  end
598
602
  return fuzzyfind_from_map(lines)
599
603
  end
@@ -834,6 +838,7 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
834
838
  flag(:update, short: 'u', desc: 'update status before listing')
835
839
  flag(:verbose, short: 'v', desc: 'multi-line output per PR')
836
840
  flag(:checks, short: 'C', desc: 'show individual check run details')
841
+ flag(:diff, short: 'd', desc: 'open diff for selected PR')
837
842
  instance_eval(&FILTER_OPTS)
838
843
  }
839
844
 
@@ -859,6 +864,16 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
859
864
  next
860
865
  end
861
866
 
867
+ if opts.diff
868
+ lines = results.each_with_index.each_with_object({}) do |(pr, idx), h|
869
+ key = pinned_manager.strip_ansi(pinned_manager.display_pinned(pr, idx, oneline: true))
870
+ h[key] = pr.number.to_s
871
+ end
872
+ pr_number = fuzzyfind_from_map(lines)
873
+ system('gh', 'pr', 'diff', pr_number) if pr_number
874
+ next
875
+ end
876
+
862
877
  if opts.numbers
863
878
  results.each { |pr| puts pr.number }
864
879
  else
@@ -1182,7 +1197,7 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
1182
1197
 
1183
1198
  if ref.nil?
1184
1199
  lines = pinned.each_with_index.each_with_object({}) do |(pr, idx), h|
1185
- h[pinned_manager.display_pinned(pr, idx, oneline: true)] = pr.number.to_s
1200
+ h[pinned_manager.strip_ansi(pinned_manager.display_pinned(pr, idx, oneline: true))] = pr.number.to_s
1186
1201
  end
1187
1202
 
1188
1203
  pr_number = fuzzyfind_from_map(lines)
@@ -1262,7 +1277,7 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
1262
1277
  next
1263
1278
  end
1264
1279
  lines = candidates.each_with_index.each_with_object({}) do |(pr, idx), h|
1265
- h[pinned_manager.display_pinned(pr, idx, oneline: true)] = pr
1280
+ h[pinned_manager.strip_ansi(pinned_manager.display_pinned(pr, idx, oneline: true))] = pr
1266
1281
  end
1267
1282
  selected = fuzzyfind_from_map(lines)
1268
1283
  next unless selected
data/exe/h CHANGED
@@ -36,7 +36,13 @@ Hiiro.run(*ARGV, cwd: Dir.pwd, tasks: true) do
36
36
 
37
37
  if opts.all
38
38
  Hiiro::Rbenv.versions.each do |ver|
39
- update_hiiro(ver)
39
+ shell_cmd = [
40
+ "(RBENV_VERSION=#{ver.shellescape} rbenv exec gem update hiiro",
41
+ "|| RBENV_VERSION=#{ver.shellescape} rbenv exec gem install hiiro)",
42
+ "&& RBENV_VERSION=#{ver.shellescape} rbenv exec h setup",
43
+ ].join(' ')
44
+ puts "Queuing update for Ruby #{ver}..."
45
+ Hiiro::Background.run('sh', '-c', shell_cmd)
40
46
  end
41
47
  else
42
48
  update_hiiro
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.273"
2
+ VERSION = "0.1.274"
3
3
  end
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.273
4
+ version: 0.1.274
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota