beniya 0.5.1 → 0.6.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: 6110d8a673eee02088b1d95fac741e95b4d470cbb5b5bb5826b3e6ac65893890
4
- data.tar.gz: 9030f59ba585966f29faa34eb2d450cff37f836431368ac5e4b2a0bb011e0cb2
3
+ metadata.gz: eabacf1e9c20898106af324c8275d857b209150badec6518d211a1820a78778f
4
+ data.tar.gz: 4e43ee255191fdad616db68a320d77f326e7fb925932145cdf6e528a4f6f67ef
5
5
  SHA512:
6
- metadata.gz: 06a6a371c75c3c36125f26ae556893c32e4e9d0eba25ebd6f14e20e9957408fed671ace6d587f0d98477ad8e5f856373fcb4b0eae9ec3b23e60840f8c8298dbf
7
- data.tar.gz: cb5d756ba159db9ecc9018b6fb44c9b0f05d8a213668e686653c09963406cde6ccf136993e259fa88d2d0b9528001e456d9e3b9b1a0cf139e4ddc1f6e8baa72f
6
+ metadata.gz: 19f7fba9a329ca1dae8b3fa1d63898af7e0f16030bbf60cb8e8b10d5af02d4e2bbba783fef30df30e2c212fef06bb07628b9122139d0c50a093752f4a2bdb0a0
7
+ data.tar.gz: d3a21a8322852750a2410145ffbd63d4c0ed72c7ae5485b6763f68d192872f05a4b7ddea62900ca910c21e04252347bcbcd679b2c1b5fbbe7721734fea8db2d8
data/CHANGELOG.md CHANGED
@@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.0] - 2025-01-XX
11
+
12
+ ### Added
13
+ - **🚀 zoxide Integration**: Complete zoxide directory history navigation functionality
14
+ - **z Key Navigation**: Press `z` key to display zoxide movement history and navigate to frequently used directories
15
+ - **Smart History Display**: Frequency-based directory sorting with up to 20 history entries
16
+ - **Interactive Selection UI**: Modern floating window for intuitive history selection
17
+ - **Fast Number Key Selection**: Direct directory selection using number keys 1-20
18
+ - **Health Check Enhancement**: zoxide installation status and version checking with `beniya -c`
19
+ - **Multi-platform Installation Support**: Automated installation instructions for macOS and Linux
20
+ - **Graceful Fallback**: Proper handling when zoxide is not installed or history is empty
21
+
22
+ ### Changed
23
+ - **Footer Help Updates**: Added `z:zoxide` to key binding display in both English and Japanese
24
+ - **External Tools Documentation**: Updated README with zoxide installation and usage instructions
25
+ - **Health Check System**: Extended to include zoxide as optional dependency with platform-specific guidance
26
+ - **Error Messaging**: Improved user guidance for zoxide-related issues
27
+
28
+ ### Technical Details
29
+ - New zoxide integration methods in `KeybindHandler` class
30
+ - Extended `HealthChecker` with zoxide version checking
31
+ - Comprehensive test suite for zoxide functionality
32
+ - Safe path escaping using Ruby's Shellwords module
33
+ - **Detailed changelog**: [CHANGELOG_v0.6.0.md](./CHANGELOG_v0.6.0.md)
34
+
10
35
  ## [0.5.0] - 2025-09-20
11
36
 
12
37
  ### Added
@@ -99,6 +124,8 @@ For detailed information, see [CHANGELOG_v0.4.0.md](./CHANGELOG_v0.4.0.md)
99
124
 
100
125
  ## Release Links
101
126
 
127
+ - [v0.6.0 Detailed Release Notes](./CHANGELOG_v0.6.0.md) - zoxide Integration and Enhanced Health Checking
128
+ - [v0.5.0 Detailed Release Notes](./CHANGELOG_v0.5.0.md) - Bookmark System Implementation
102
129
  - [v0.4.0 Detailed Release Notes](./CHANGELOG_v0.4.0.md) - Comprehensive changelog with technical details
103
130
  - [GitHub Releases](https://github.com/masisz/beniya/releases) - Download releases and view release history
104
131
  - [Installation Guide](./README.md#installation) - How to install beniya
@@ -0,0 +1,182 @@
1
+ # CHANGELOG - beniya v0.6.0
2
+
3
+ **Release Date**: 2025-09-28
4
+
5
+ ## 🚀 New Features
6
+
7
+ ### zoxide Integration
8
+
9
+ - **zoxide History Navigation with z Key**: Press `z` key to display zoxide movement history and quickly navigate to previously visited directories
10
+ - **Smart History Display**: Frequently used directories appear at the top of the list
11
+ - **Interactive Selection UI**: Floating window displays up to 20 history entries
12
+ - **Fast Selection with Number Keys**: Select directories directly using number keys 1-20
13
+ - **Abbreviated Path Display**: Home directory displayed as `~` with nicely formatted long paths
14
+ - **Graceful Handling**: Proper handling when zoxide is not installed or history is empty
15
+
16
+ ### Health Check Enhancement
17
+
18
+ - **zoxide Check Addition**: Check zoxide installation status and version with `beniya -c`
19
+ - **Installation Instructions**: Detailed platform-specific (macOS/Linux) installation instructions
20
+
21
+ ## 🎨 UI/UX Improvements
22
+
23
+ ### User Interface
24
+
25
+ - **Footer Help Updates**:
26
+ - English version: Added `z:zoxide` to key binding list
27
+ - Japanese version: Added `z:zoxide` to key binding list
28
+ - **zoxide History Selection Dialog**: Intuitive floating window for history selection
29
+ - **Improved Error Messages**: Clear guidance when zoxide is not installed
30
+
31
+ ## 📖 Documentation Updates
32
+
33
+ ### README Updates
34
+
35
+ **Japanese Version (README.md)**:
36
+
37
+ - New zoxide integration features section
38
+ - Added `z:zoxide` to key bindings list
39
+ - Detailed explanation of zoxide overview and installation methods
40
+ - Added zoxide to required external tools list
41
+ - Clarified purpose of each tool
42
+
43
+ **English Version (README_EN.md)**:
44
+
45
+ - New zoxide Integration Features section
46
+ - Added `z:zoxide integration` to Key Bindings
47
+ - Detailed zoxide explanation and installation instructions
48
+ - Expanded Required External Tools section
49
+ - Clarified Tool Usage
50
+
51
+ ### Added Documentation Content
52
+
53
+ - **Detailed explanation of zoxide history navigation features**
54
+ - **Usage examples and workflows**
55
+ - **Overview of zoxide**
56
+ - **Platform-specific installation methods**
57
+ - **Requirements and limitations**
58
+
59
+ ## 🔧 Technical Improvements
60
+
61
+ ### Architecture
62
+
63
+ - **KeybindHandler Class Extension**: Added zoxide-related methods
64
+ - `zoxide_available?`: Check zoxide availability
65
+ - `get_zoxide_history`: Get and parse zoxide history
66
+ - `show_zoxide_menu`: Display history in floating window
67
+ - `select_from_zoxide_history`: Interactive history selection
68
+ - `navigate_to_zoxide_directory`: Navigate to selected directory
69
+
70
+ ### HealthChecker Class Extension
71
+
72
+ - **check_zoxide Method**: Version checking and status verification for zoxide
73
+ - **install_instruction_for Method Extension**: Added installation instructions for zoxide
74
+
75
+ ### Configuration System
76
+
77
+ - **Multi-language Message Support**:
78
+ - `health.zoxide`: Support for both English and Japanese
79
+ - Updated footer help messages
80
+
81
+ ## 🧪 Testing
82
+
83
+ ### New Tests Added
84
+
85
+ - **zoxide Integration Tests** (`test/test_zoxide_integration.rb`):
86
+ - zoxide availability tests
87
+ - History retrieval functionality tests
88
+ - UI display tests
89
+ - Directory navigation tests
90
+ - Error handling tests
91
+
92
+ - **Health Check Test Extensions**:
93
+ - `test_check_zoxide`: zoxide check functionality tests
94
+ - `test_install_instruction_for_zoxide`: Installation instruction tests
95
+
96
+ ## 📦 Dependencies
97
+
98
+ ### New Dependencies
99
+
100
+ - **zoxide**: Directory history functionality (optional)
101
+ - macOS: `brew install zoxide`
102
+ - Ubuntu/Debian: `apt install zoxide`
103
+ - Others: [Official Documentation](https://github.com/ajeetdsouza/zoxide#installation)
104
+
105
+ ### Dependency Updates
106
+
107
+ - **Shellwords Module**: Used for path escaping (Ruby standard library)
108
+
109
+ ## 🔄 Compatibility
110
+
111
+ ### Backward Compatibility
112
+
113
+ - **No Impact on Existing Features**: No changes to existing key bindings or functionality
114
+ - **Configuration File Compatibility**: Existing configuration files can be used as-is
115
+ - **Optional Feature**: All existing features work normally even without zoxide
116
+
117
+ ### Platform Support
118
+
119
+ - **macOS**: Full support (installation via Homebrew recommended)
120
+ - **Linux**: Full support (via package managers)
121
+ - **Windows**: Basic compatibility (zoxide installation methods need separate verification)
122
+
123
+ ## ⚡ Performance
124
+
125
+ ### Optimizations
126
+
127
+ - **Efficient History Retrieval**: Optimal use of zoxide query commands
128
+ - **Memory Usage**: History display limited to maximum 20 entries
129
+ - **Responsiveness**: Fast floating window rendering
130
+
131
+ ## 🐛 Bug Fixes
132
+
133
+ ### Fixed Issues
134
+
135
+ - **zoxide Output Format Support**: Correctly retrieve scored output with `zoxide query --list --score`
136
+ - **Empty History Handling**: Proper message display when no history exists
137
+ - **Path Escaping**: Safe handling of paths with special characters
138
+
139
+ ## 🔮 Future Plans
140
+
141
+ ### Planned for Next Version
142
+
143
+ - **zoxide Integration Update History Recording**: Automatically record directory movements within beniya to zoxide
144
+ - **Customizable History Display Count**: Adjust display count via configuration file
145
+ - **History Filtering**: Filter history by specific patterns
146
+
147
+ ## 📝 Usage Examples
148
+
149
+ ### Basic Usage
150
+
151
+ ```bash
152
+ # Launch beniya
153
+ beniya
154
+
155
+ # Press z key to display zoxide history
156
+ # Enter displayed number (1-20) to navigate to directory
157
+ # Press ESC to cancel
158
+ ```
159
+
160
+ ### Health Check
161
+
162
+ ```bash
163
+ # Check all dependencies including zoxide
164
+ beniya -c
165
+
166
+ # Example output:
167
+ # ✓ zoxide (directory history) zoxide 0.9.8
168
+ ```
169
+
170
+ ## 🙏 Acknowledgments
171
+
172
+ Main contributions in this version:
173
+
174
+ - **zoxide**: [ajeetdsouza/zoxide](https://github.com/ajeetdsouza/zoxide) - Excellent directory navigation tool
175
+ - **Ruby Standard Library**: Utilization of Shellwords module
176
+
177
+ ---
178
+
179
+ **Note**: This version is the initial implementation of zoxide integration features. We welcome feedback and improvement suggestions.
180
+
181
+ **GitHub Issues**: [https://github.com/masisz/beniya/issues](https://github.com/masisz/beniya/issues)
182
+
data/README.md CHANGED
@@ -111,6 +111,12 @@ beniya --help # ヘルプメッセージを表示
111
111
  | `b` | ブックマークメニューを表示 |
112
112
  | `1`-`9` | 対応する番号のブックマークに移動 |
113
113
 
114
+ #### zoxide連携機能
115
+
116
+ | キー | 機能 |
117
+ | ---- | ---------------------------------- |
118
+ | `z` | zoxide履歴からディレクトリを選択移動 |
119
+
114
120
  #### システム操作
115
121
 
116
122
  | キー | 機能 |
@@ -225,22 +231,68 @@ beniya起動時のディレクトリが**ベースディレクトリ**として
225
231
  - beniya再起動後もブックマーク情報が保持される
226
232
  - JSONファイルを直接編集することも可能
227
233
 
234
+ ### zoxide連携機能の詳細
235
+
236
+ #### zoxide履歴移動 (`z`)
237
+
238
+ - **スマート履歴**: zoxideが記録したディレクトリ移動履歴を表示
239
+ - **フリークエンシー順**: よく使用するディレクトリほど上位に表示
240
+ - **インタラクティブ選択**: フローティングウィンドウで履歴を選択
241
+ - **高速ナビゲーション**: 数字キーで直接ディレクトリを選択
242
+ - **パス省略表示**: ホームディレクトリを`~`で表示し見やすく
243
+
244
+ #### 使用例
245
+
246
+ ```
247
+ 1. z → zoxide履歴メニューを表示
248
+ 2. 1-20 → 表示された番号でディレクトリを選択
249
+ 3. ESC → キャンセルして元の画面に戻る
250
+ ```
251
+
252
+ #### zoxideについて
253
+
254
+ [zoxide](https://github.com/ajeetdsouza/zoxide)は、ディレクトリ移動履歴を学習するスマートなcdコマンドです。
255
+
256
+ ```bash
257
+ # zoxideのインストール
258
+ # macOS (Homebrew)
259
+ brew install zoxide
260
+
261
+ # Ubuntu/Debian
262
+ apt install zoxide
263
+
264
+ # その他のインストール方法は公式ドキュメントを参照
265
+ # https://github.com/ajeetdsouza/zoxide#installation
266
+ ```
267
+
268
+ #### 動作要件
269
+
270
+ - zoxideがシステムにインストールされている必要があります
271
+ - zoxideが無効な場合は適切なメッセージが表示されます
272
+ - 履歴が空の場合も適切にハンドリングされます
273
+
228
274
  ### 必要な外部ツール
229
275
 
230
- 検索機能を使用するには、以下のツールが必要です:
276
+ 検索機能・履歴機能を使用するには、以下のツールが必要です:
231
277
 
232
278
  ```bash
233
279
  # macOS (Homebrew)
234
- brew install fzf rga
280
+ brew install fzf rga zoxide
235
281
 
236
282
  # Ubuntu/Debian
237
- apt install fzf
283
+ apt install fzf zoxide
238
284
  # rgaは別途インストールが必要: https://github.com/phiresky/ripgrep-all
239
285
 
240
286
  # その他のLinuxディストリビューション
241
287
  # パッケージマネージャーまたは手動インストールが必要
242
288
  ```
243
289
 
290
+ #### 各ツールの用途
291
+
292
+ - **fzf**: ファイル名検索機能(`s`キー)
293
+ - **rga**: ファイル内容検索機能(`F`キー)
294
+ - **zoxide**: ディレクトリ履歴移動機能(`z`キー)
295
+
244
296
  ## 設定
245
297
 
246
298
  ### 色設定(カスタマイズ)
data/README_EN.md CHANGED
@@ -105,6 +105,19 @@ beniya --help # Show help message
105
105
  | `f` | File name search with fzf (with preview) |
106
106
  | `F` | File content search with rga |
107
107
 
108
+ #### Bookmark Functions
109
+
110
+ | Key | Function |
111
+ | ------- | ------------------------------- |
112
+ | `b` | Show bookmark menu |
113
+ | `1`-`9` | Go to corresponding bookmark |
114
+
115
+ #### zoxide Integration
116
+
117
+ | Key | Function |
118
+ | --- | ---------------------------------- |
119
+ | `z` | Select directory from zoxide history |
120
+
108
121
  #### System Operations
109
122
 
110
123
  | Key | Function |
@@ -198,22 +211,89 @@ The directory where beniya starts becomes the **base directory**, which serves a
198
211
  - Searches PDFs, Word documents, text in images, and more
199
212
  - Filter results with fzf and jump to specific lines
200
213
 
214
+ ### Bookmark Features
215
+
216
+ #### Bookmark Operations (`b`)
217
+
218
+ - **Add Bookmark**: `[A]` - Add current directory to bookmarks
219
+ - **List Bookmarks**: `[L]` - Display registered bookmarks
220
+ - **Remove Bookmark**: `[R]` - Remove a bookmark
221
+ - **Number Jump**: `1-9` - Jump directly to corresponding bookmark
222
+
223
+ #### Quick Navigation (`1`-`9`)
224
+
225
+ - Jump directly to bookmarks without going through the bookmark menu
226
+ - Supports up to 9 bookmarks
227
+ - Bookmark information is displayed at the top of the screen
228
+
229
+ #### Bookmark Persistence
230
+
231
+ - Bookmark information is automatically saved to `~/.config/beniya/bookmarks.json`
232
+ - Bookmark information is preserved after beniya restarts
233
+ - JSON file can be edited directly
234
+
235
+ ### zoxide Integration Features
236
+
237
+ #### zoxide History Navigation (`z`)
238
+
239
+ - **Smart History**: Display directory navigation history recorded by zoxide
240
+ - **Frequency Order**: More frequently used directories appear higher in the list
241
+ - **Interactive Selection**: Select from history using floating window
242
+ - **Quick Navigation**: Select directories directly with number keys
243
+ - **Abbreviated Path Display**: Home directory shown as `~` for readability
244
+
245
+ #### Usage Example
246
+
247
+ ```
248
+ 1. z → Display zoxide history menu
249
+ 2. 1-20 → Select directory by displayed number
250
+ 3. ESC → Cancel and return to original screen
251
+ ```
252
+
253
+ #### About zoxide
254
+
255
+ [zoxide](https://github.com/ajeetdsouza/zoxide) is a smart cd command that learns your directory navigation habits.
256
+
257
+ ```bash
258
+ # Installing zoxide
259
+ # macOS (Homebrew)
260
+ brew install zoxide
261
+
262
+ # Ubuntu/Debian
263
+ apt install zoxide
264
+
265
+ # For other installation methods, see official documentation
266
+ # https://github.com/ajeetdsouza/zoxide#installation
267
+ ```
268
+
269
+ #### Requirements
270
+
271
+ - zoxide must be installed on the system
272
+ - Appropriate message is displayed when zoxide is not available
273
+ - Empty history is handled gracefully
274
+
201
275
  ### Required External Tools
202
276
 
203
- The following tools are required for search functionality:
277
+ The following tools are required for search and history functionality:
204
278
 
205
279
  ```bash
206
280
  # macOS (Homebrew)
207
- brew install fzf rga
281
+ brew install fzf rga zoxide
208
282
 
209
283
  # Ubuntu/Debian
210
- apt install fzf
284
+ apt install fzf zoxide
211
285
  # rga requires separate installation: https://github.com/phiresky/ripgrep-all
212
286
 
213
287
  # Other Linux distributions
214
288
  # Installation via package manager or manual installation required
215
289
  ```
216
290
 
291
+ #### Tool Usage
292
+
293
+ - **fzf**: File name search functionality (`f` key)
294
+ - **rga**: File content search functionality (`F` key)
295
+ - **zoxide**: Directory history navigation functionality (`z` key)
296
+
217
297
  ## Configuration
218
298
 
219
299
  ### Color Configuration (Customization)
@@ -2,6 +2,9 @@
2
2
 
3
3
  module Beniya
4
4
  class Application
5
+ # Error display constants
6
+ BACKTRACE_LINES = 5 # Number of backtrace lines to show
7
+
5
8
  def initialize(start_directory = Dir.pwd)
6
9
  @start_directory = File.expand_path(start_directory)
7
10
  # Load configuration including language settings
@@ -22,7 +25,7 @@ module Beniya
22
25
  puts "\n\n#{ConfigLoader.message('app.interrupted')}"
23
26
  rescue StandardError => e
24
27
  puts "\n#{ConfigLoader.message('app.error_occurred')}: #{e.message}"
25
- puts e.backtrace.first(5).join("\n")
28
+ puts e.backtrace.first(BACKTRACE_LINES).join("\n")
26
29
  end
27
30
  end
28
31
  end
data/lib/beniya/config.rb CHANGED
@@ -43,8 +43,8 @@ module Beniya
43
43
  'ui.operation_prompt' => 'Operation: ',
44
44
 
45
45
  # Help text
46
- 'help.full' => 'j/k:move h:back l:enter o:open g/G:top/bottom r:refresh f:filter s:search F:content a/A:create m/p/x:ops b:bookmark 1-9:goto q:quit',
47
- 'help.short' => 'j/k:move h:back l:enter o:open f:filter s:search b:bookmark 1-9:goto q:quit',
46
+ 'help.full' => 'j/k:move h:back l:enter o:open g/G:top/bottom r:refresh f:filter s:search F:content a/A:create m/p/x:ops b:bookmark z:zoxide 1-9:goto q:quit',
47
+ 'help.short' => 'j/k:move h:back l:enter o:open f:filter s:search b:bookmark z:zoxide 1-9:goto q:quit',
48
48
 
49
49
  # Health check messages
50
50
  'health.title' => 'beniya Health Check',
@@ -52,6 +52,7 @@ module Beniya
52
52
  'health.required_gems' => 'Required gems',
53
53
  'health.fzf' => 'fzf (file search)',
54
54
  'health.rga' => 'rga (content search)',
55
+ 'health.zoxide' => 'zoxide (directory history)',
55
56
  'health.file_opener' => 'System file opener',
56
57
  'health.summary' => 'Summary:',
57
58
  'health.ok' => 'OK',
@@ -111,8 +112,8 @@ module Beniya
111
112
  'ui.operation_prompt' => '操作: ',
112
113
 
113
114
  # Help text
114
- 'help.full' => 'j/k:移動 h:戻る l:入る o:開く g/G:先頭/末尾 r:更新 f:絞込 s:検索 F:内容 a/A:作成 m/p/x:操作 b:ブックマーク 1-9:移動 q:終了',
115
- 'help.short' => 'j/k:移動 h:戻る l:入る o:開く f:絞込 s:検索 b:ブックマーク 1-9:移動 q:終了',
115
+ 'help.full' => 'j/k:移動 h:戻る l:入る o:開く g/G:先頭/末尾 r:更新 f:絞込 s:検索 F:内容 a/A:作成 m/p/x:操作 b:ブックマーク z:zoxide 1-9:移動 q:終了',
116
+ 'help.short' => 'j/k:移動 h:戻る l:入る o:開く f:絞込 s:検索 b:ブックマーク z:zoxide 1-9:移動 q:終了',
116
117
 
117
118
  # Health check messages
118
119
  'health.title' => 'beniya ヘルスチェック',
@@ -120,6 +121,7 @@ module Beniya
120
121
  'health.required_gems' => '必須 gem',
121
122
  'health.fzf' => 'fzf (ファイル検索)',
122
123
  'health.rga' => 'rga (内容検索)',
124
+ 'health.zoxide' => 'zoxide (ディレクトリ履歴)',
123
125
  'health.file_opener' => 'システムファイルオープナー',
124
126
  'health.summary' => 'サマリー:',
125
127
  'health.ok' => 'OK',
@@ -6,6 +6,13 @@ module Beniya
6
6
  DEFAULT_MAX_LINES = 50
7
7
  MAX_LINE_LENGTH = 500
8
8
 
9
+ # Binary detection constants
10
+ BINARY_SAMPLE_SIZE = 512
11
+ PRINTABLE_CHAR_THRESHOLD = 32
12
+ CONTROL_CHAR_TAB = 9
13
+ CONTROL_CHAR_NEWLINE = 10
14
+ CONTROL_CHAR_CARRIAGE_RETURN = 13
15
+
9
16
  def initialize
10
17
  # future: hold syntax highlight settings etc.
11
18
  end
@@ -19,7 +26,7 @@ module Beniya
19
26
 
20
27
  begin
21
28
  # binary file detection
22
- sample = File.binread(file_path, [file_size, 512].min)
29
+ sample = File.binread(file_path, [file_size, BINARY_SAMPLE_SIZE].min)
23
30
  return binary_response(file_path) if binary_file?(sample)
24
31
 
25
32
  # process as text file
@@ -44,8 +51,9 @@ module Beniya
44
51
 
45
52
  def binary_file?(sample)
46
53
  return false if sample.empty?
47
-
48
- binary_chars = sample.bytes.count { |byte| byte < 32 && ![9, 10, 13].include?(byte) }
54
+
55
+ allowed_control_chars = [CONTROL_CHAR_TAB, CONTROL_CHAR_NEWLINE, CONTROL_CHAR_CARRIAGE_RETURN]
56
+ binary_chars = sample.bytes.count { |byte| byte < PRINTABLE_CHAR_THRESHOLD && !allowed_control_chars.include?(byte) }
49
57
  (binary_chars.to_f / sample.bytes.length) > BINARY_THRESHOLD
50
58
  end
51
59
 
@@ -20,6 +20,7 @@ module Beniya
20
20
  { name: ConfigLoader.message('health.required_gems'), method: :check_required_gems },
21
21
  { name: ConfigLoader.message('health.fzf'), method: :check_fzf },
22
22
  { name: ConfigLoader.message('health.rga'), method: :check_rga },
23
+ { name: ConfigLoader.message('health.zoxide'), method: :check_zoxide },
23
24
  { name: ConfigLoader.message('health.file_opener'), method: :check_file_opener }
24
25
  ]
25
26
 
@@ -118,6 +119,23 @@ module Beniya
118
119
  end
119
120
  end
120
121
 
122
+ def check_zoxide
123
+ if system("which zoxide > /dev/null 2>&1")
124
+ version = `zoxide --version 2>/dev/null`.strip
125
+ {
126
+ status: :ok,
127
+ message: version,
128
+ details: nil
129
+ }
130
+ else
131
+ {
132
+ status: :warning,
133
+ message: "zoxide #{ConfigLoader.message('health.tool_not_found')}",
134
+ details: install_instruction_for('zoxide')
135
+ }
136
+ end
137
+ end
138
+
121
139
  def check_file_opener
122
140
  case RUBY_PLATFORM
123
141
  when /darwin/
@@ -160,6 +178,8 @@ module Beniya
160
178
  "#{ConfigLoader.message('health.install_brew')} fzf"
161
179
  when 'rga'
162
180
  "#{ConfigLoader.message('health.install_brew')} rga"
181
+ when 'zoxide'
182
+ "#{ConfigLoader.message('health.install_brew')} zoxide"
163
183
  end
164
184
  when /linux/
165
185
  case tool
@@ -167,6 +187,8 @@ module Beniya
167
187
  "#{ConfigLoader.message('health.install_apt')} fzf (Ubuntu/Debian) or check your package manager"
168
188
  when 'rga'
169
189
  ConfigLoader.message('health.rga_releases')
190
+ when 'zoxide'
191
+ "#{ConfigLoader.message('health.install_apt')} zoxide (Ubuntu/Debian) or check your package manager"
170
192
  end
171
193
  else
172
194
  ConfigLoader.message('health.install_guide')