brunch 0.9.0 → 0.9.1

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: 4701eb90f48c72479c1c5018c76b0d8dc8c3c93accf4cd696f28fd75829321c5
4
- data.tar.gz: 4b8116a2365dbc41672702a9be4180a6c93f7f21e3a7098df1d1e3ca1cad8576
3
+ metadata.gz: 668bcb5a607af2adcad5006541dc927be6e1c5277d4c79f57b46de725e96076b
4
+ data.tar.gz: c9a02342f703ce5546860760165f4e6b3226cbc6d686f1b5b12a3891e27ad85d
5
5
  SHA512:
6
- metadata.gz: 7ea73a21990f517294eb5255bce523ac49e3bc5ca7f71f2c2e55c9e57cf8c0d5d3125819a8db5563cc15904a02ee62f18e0b73449d13309adcd8e99d79246884
7
- data.tar.gz: c61a44ca01705759b66512972a87e75040c3f9d3445731bf4b73e506a72259c8022b3617e12c20fdfc045e43869a19c0565702df9a18ce655774fa56dcf1c83e
6
+ metadata.gz: d47e2a2fa7a68de063d05696eadaac3e4e41939d4e9faac87c875752c0a4e83542a13dfe9a0171b17590f7208825088de95875c87e156c10b91be2fed7a43393
7
+ data.tar.gz: 94449f91dbaa4bbcb70ab6aca393068f4e25e0e92797487195de86ffd05f5d2c50ab7f3f50b6fe2837938f1da6d5e6cbca03f34ffe3309e4789e411854c0fa5f
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.9.1 - 2026-10-03
6
+
7
+ - Replace `brunch ports` with `brunch list` and add `brunch watch` for a
8
+ continuously refreshed interactive view of branch environments.
9
+
5
10
  ## 0.9.0 - 2026-10-02
6
11
 
7
12
  - Remove environments for deleted local branches after the next Brunch command,
data/README.md CHANGED
@@ -176,15 +176,22 @@ Then:
176
176
  cd ../feature-a
177
177
 
178
178
  brunch port
179
- brunch ports
179
+ brunch list
180
180
  ```
181
181
 
182
182
  `brunch port` prints the current worktree's port.
183
183
 
184
- `brunch ports` groups the current and previously activated branches under each
184
+ `brunch list` groups the current and previously activated branches under each
185
185
  worktree. Stopped branches appear in gray and retain their worktree's port for
186
186
  the next activation.
187
187
 
188
+ ```bash
189
+ brunch watch
190
+ ```
191
+
192
+ `brunch watch` shows the same view and refreshes it every second. Press
193
+ `Ctrl-C` to stop watching.
194
+
188
195
  Switching branches inside one worktree does not affect environments running in other worktrees.
189
196
 
190
197
  If you create a worktree with plain Git:
@@ -331,11 +338,17 @@ brunch port
331
338
  Print the current worktree's port.
332
339
 
333
340
  ```bash
334
- brunch ports
341
+ brunch list
335
342
  ```
336
343
 
337
344
  List current and stopped branch environments grouped by worktree.
338
345
 
346
+ ```bash
347
+ brunch watch
348
+ ```
349
+
350
+ Continuously refresh the branch-environment list in an interactive terminal.
351
+
339
352
  ```bash
340
353
  brunch stop
341
354
  ```
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Brunch
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.1"
5
5
  end
@@ -23,13 +23,14 @@ module Brunch
23
23
  in ["branch-deleted", ref, oid] then record_deleted_branch(ref, oid)
24
24
  in ["cleanup"] | ["register", _] then worktree_cleanup
25
25
  in ["status"] then worktree_status
26
- in ["ports"] then worktree_ports
26
+ in ["list"] then worktree_ports
27
+ in ["watch"] then worktree_watch
27
28
  in ["port"] then worktree_port
28
29
  in ["logs", *arguments] then worktree_logs(arguments)
29
30
  in ["run", "--", *command] if !command.empty? then worktree_run(command)
30
31
  in ["doctor"] then worktree_doctor
31
32
  else
32
- warn "Usage: brunch {activate|start <current-ref>|stop|restart|status|ports|port|logs [args]|run -- <cmd>|doctor|cleanup}"
33
+ warn "Usage: brunch {activate|start <current-ref>|stop|restart|status|list|watch|port|logs [args]|run -- <cmd>|doctor|cleanup}"
33
34
  return 64
34
35
  end
35
36
  0
@@ -394,6 +395,20 @@ module Brunch
394
395
  end
395
396
  end
396
397
 
398
+ def worktree_watch
399
+ raise CLI::OperationError, "brunch watch requires an interactive terminal." unless $stdout.tty?
400
+
401
+ loop do
402
+ print "\e[2J\e[H"
403
+ worktree_ports
404
+ puts "\nRefreshing every second. Press Ctrl-C to stop."
405
+ $stdout.flush
406
+ sleep 1
407
+ end
408
+ rescue Interrupt
409
+ puts "\nStopped watching."
410
+ end
411
+
397
412
  def worktree_port
398
413
  record, = current_worktree_entry(state)
399
414
  raise CLI::OperationError, "No Brunch environment in this worktree." unless record
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brunch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Ciemborowicz