hiiro 0.1.375 → 0.1.376

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: 608c0e99d75c4cec38c9f12c577ea7e5035953372a3ab0176a824531754ccbeb
4
- data.tar.gz: 3d0e98cc504d5838444432d80551d5131654221a4167223d4937670d50c523e2
3
+ metadata.gz: a8a343767837132ea50864926898caf5fcbc01788bbfadd351f426fe6e7bc770
4
+ data.tar.gz: e8274d74d87414a087f45f3bf65584ecec9ffd999d48ca5328591e729babdf9e
5
5
  SHA512:
6
- metadata.gz: a60de68ce1d1dcfbd7e839d6675d4d62f878c12debeecbac3f6c5a6e29f5ca534d7fdd5a173a4913191c4225b994dbd78de4b807af634063bc9872e5deae6f86
7
- data.tar.gz: 3ef9b8c14c4bbf9e01762e66f0303c00bb16177679752f20af5cfdee4cf7c22ba496b3023fae2e3d7cc6f33c1527be22c342e9a55cd721e817d49eb5ae4c4ab2
6
+ metadata.gz: 46b9f915a21b4c84a14971b5b30aa1a6f48f1507b049eb4ff59546e627c9eccb84cc0ac8863591dc50ab4f4ae4afff3af45c599c430751bcc3b1b7bb3e81fefc
7
+ data.tar.gz: 45c777ea183fbc5eb26de72be4b7a4e303423c76f0ca99431b492d6615e82d296932cddb17c46f7f2ea6dabdd936e2762290d9a81375dc5d82413f35d770fabe
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.1.376] - 2026-09-14
6
+
7
+ ### Changed
8
+ - Herdr `hiiro.nvim` action opens bare `nvim` in the calling pane's working directory instead of the task notes home
9
+
5
10
  ## [0.1.375] - 2026-09-14
6
11
 
7
12
  ### Changed
data/bin/h-herdr CHANGED
@@ -86,8 +86,20 @@ Hiiro.run(*ARGV, external_commands: false) do
86
86
  name = opts.args.first
87
87
  raise Hiiro::Error, "Unknown action #{name}; one of #{ACTIONS.join(', ')}" unless ACTIONS.include?(name)
88
88
  size = %w[shell nvim].include?(name) ? %w[--width 90% --height 90%] : []
89
+ extra = []
90
+ if name == 'nvim' && (cwd = calling_pane_cwd)
91
+ extra = ['--cwd', cwd, '--env', "HIIRO_HERDR_CWD=#{cwd}"]
92
+ end
89
93
  system(herdr_bin, 'plugin', 'pane', 'open', '--plugin', PLUGIN_ID, '--entrypoint', 'popup',
90
- '--env', "HIIRO_HERDR_ACTION=#{name}", *size, '--focus')
94
+ '--env', "HIIRO_HERDR_ACTION=#{name}", *size, *extra, '--focus')
95
+ end
96
+
97
+ # Working directory of the pane the key was pressed in (HERDR_PANE_ID, else the focused pane).
98
+ def calling_pane_cwd
99
+ pane = ENV['HERDR_PANE_ID'] ? herdr_client.get_pane(ENV['HERDR_PANE_ID']) : herdr_client.panes(all: true).find(&:focused?)
100
+ pane && (pane.foreground_cwd || pane.cwd)
101
+ rescue StandardError
102
+ nil
91
103
  end
92
104
 
93
105
  # Runs inside the popup pane (real TTY, HERDR_WORKSPACE_ID set by Herdr).
@@ -144,10 +156,9 @@ Hiiro.run(*ARGV, external_commands: false) do
144
156
  when 'shell'
145
157
  exec('t', 'sh')
146
158
  when 'nvim'
147
- task = Hiiro::CurrentTask.new(herdr: -> { herdr_client }, pin: true).resolve!
148
- FileUtils.mkdir_p(task.home)
149
- Dir.chdir(task.home)
150
- exec(ENV['EDITOR'] || 'nvim', '.')
159
+ cwd = ENV['HIIRO_HERDR_CWD']
160
+ Dir.chdir(cwd) if cwd && Dir.exist?(cwd)
161
+ exec(ENV['EDITOR'] || 'nvim')
151
162
  end
152
163
  rescue Hiiro::Error => e
153
164
  pause("ERROR: #{e.message}")
data/docs/h-herdr.md CHANGED
@@ -20,7 +20,7 @@ herdr server reload-config
20
20
  | `hiiro.todo-add` | `prefix+shift+a` | Fuzzy-pick a task (current task first), type the todo text, then `t NAME todo add TEXT` |
21
21
  | `hiiro.todos` | `prefix+shift+y` | Fuzzy-pick an open todo of the current task and copy its text to the clipboard |
22
22
  | `hiiro.shell` | `prefix+shift+s` | 90% popup running `t sh` in the current task's start directory |
23
- | `hiiro.nvim` | `prefix+shift+e` | 90% popup running `$EDITOR` (default `nvim`) in the current task's notes home |
23
+ | `hiiro.nvim` | `prefix+shift+e` | 90% popup running bare `$EDITOR` (default `nvim`) in the working directory of the pane the key was pressed in |
24
24
 
25
25
  The current task resolves through `Hiiro::CurrentTask`: the popup's Herdr workspace, then the working directory, then the task saved with `t use TASK`. Errors print in the popup for two seconds before it closes.
26
26
 
@@ -34,7 +34,7 @@ command = ["h", "herdr", "action", "shell"]
34
34
 
35
35
  [[actions]]
36
36
  id = "nvim"
37
- title = "nvim in the current task notes"
37
+ title = "nvim in the current pane directory"
38
38
  contexts = ["workspace"]
39
39
  command = ["h", "herdr", "action", "nvim"]
40
40
 
data/lib/hiiro/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  class Hiiro
2
- VERSION = "0.1.375"
2
+ VERSION = "0.1.376"
3
3
  SUPPORTED_RUBY_VERSION = ">= 3.2.0"
4
4
  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.375
4
+ version: 0.1.376
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota