rufio 0.21.0 → 0.31.0
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 +4 -4
- data/CHANGELOG_v0.30.0.md +148 -0
- data/CHANGELOG_v0.31.0.md +125 -0
- data/README.md +65 -0
- data/bin/rufio +80 -9
- data/info/help.md +111 -0
- data/info/keybindings.md +102 -0
- data/info/welcome.md +40 -0
- data/lib/rufio/directory_listing.rb +2 -1
- data/lib/rufio/keybind_handler.rb +224 -11
- data/lib/rufio/terminal_ui.rb +138 -17
- data/lib/rufio/version.rb +1 -1
- data/retag.sh +55 -0
- metadata +12 -7
- data/docs/PLUGIN_GUIDE.md +0 -431
- data/docs/plugin_example.rb +0 -119
- data/info/welcome.txt +0 -21
- data/rufio.gemspec +0 -40
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a7c5ebea1d23ee7dfd964bdfa8b3ed9a99fa404b6c1f4fc5f1af3afaa2567f42
|
|
4
|
+
data.tar.gz: 3f74121e14480e2d75a12cccca5c2984f6e7da5f894a89d8fb782a9a3fd9428e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 410b4b98fd4ea4ba3ef077fb31432f7974377be3e971bba1b60f390be99a8547e1cd5afb7b0209d631ed85cd5b87d519571b0fe1f1d6fb76ef58801be2911895
|
|
7
|
+
data.tar.gz: 345156bf65cae10f7a64756c9882d065e483519fb2f3ec6360dfbe729e0c88a7d42ada9c9b920b25dfa5ce2e81e216281677c239ae4b21672996535bb3799912
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Changelog - v0.30.0
|
|
2
|
+
|
|
3
|
+
## Release Date: 2025-12-30
|
|
4
|
+
|
|
5
|
+
## New Features & Improvements
|
|
6
|
+
|
|
7
|
+
### Help System Overhaul
|
|
8
|
+
|
|
9
|
+
#### Help Mode (Press `?`)
|
|
10
|
+
- **Full-screen help mode** instead of popup dialog
|
|
11
|
+
- Browse help documentation files in `info/` directory
|
|
12
|
+
- Uses normal file manager UI for navigation
|
|
13
|
+
- Navigation restricted to `info/` directory (cannot go to parent)
|
|
14
|
+
- Press `ESC` to exit help mode and return to previous directory
|
|
15
|
+
|
|
16
|
+
#### Help Documentation
|
|
17
|
+
- Converted all help files to **Markdown format** (`.md`)
|
|
18
|
+
- **Unified language**: All documentation now in English
|
|
19
|
+
- Created comprehensive help files:
|
|
20
|
+
- `info/welcome.md` - Introduction and quick start guide
|
|
21
|
+
- `info/help.md` - Complete feature documentation with table of contents
|
|
22
|
+
- `info/keybindings.md` - Full keybindings reference organized by category
|
|
23
|
+
|
|
24
|
+
### Preview Pane Scrolling
|
|
25
|
+
|
|
26
|
+
#### Enter Key Behavior Change
|
|
27
|
+
- Press `Enter` on a **file** to focus preview pane (instead of doing nothing)
|
|
28
|
+
- Press `Enter` on a **directory** to navigate into it (unchanged)
|
|
29
|
+
- Preview pane shows `[PREVIEW MODE]` indicator when focused
|
|
30
|
+
|
|
31
|
+
#### Scroll Controls in Preview Mode
|
|
32
|
+
- `j` / `↓` : Scroll down one line
|
|
33
|
+
- `k` / `↑` : Scroll up one line
|
|
34
|
+
- `Ctrl+D` : Scroll down half page (20 lines)
|
|
35
|
+
- `Ctrl+U` : Scroll up half page (20 lines)
|
|
36
|
+
- `ESC` : Exit preview mode and return focus to directory list
|
|
37
|
+
|
|
38
|
+
#### Smart Scroll Management
|
|
39
|
+
- Scroll position automatically resets when changing files
|
|
40
|
+
- Scroll position cannot go below zero
|
|
41
|
+
- Works in both **normal mode** and **help mode**
|
|
42
|
+
|
|
43
|
+
### UI Improvements
|
|
44
|
+
|
|
45
|
+
#### Footer Enhancements
|
|
46
|
+
- **Bookmark list with numbers**: `0.dirname 1.bookmark1 2.bookmark2 ...`
|
|
47
|
+
- **Bookmark 0**: Jump to startup directory with `0` key
|
|
48
|
+
- **Processing time**: Display render time in milliseconds
|
|
49
|
+
- **Help hint**: `?:help` shown on the right side
|
|
50
|
+
- Removed time and version display from footer (simplified layout)
|
|
51
|
+
|
|
52
|
+
#### Project Mode Improvements
|
|
53
|
+
- Bookmark list displays with numbers: `1. project1`, `2. project2`, etc.
|
|
54
|
+
- Improved consistency with bookmark number navigation
|
|
55
|
+
|
|
56
|
+
### Header Improvements
|
|
57
|
+
- Help mode indicator: `[Help Mode - Press ESC to exit]`
|
|
58
|
+
- Version information moved to help dialog
|
|
59
|
+
|
|
60
|
+
## Technical Changes
|
|
61
|
+
|
|
62
|
+
### New Methods
|
|
63
|
+
|
|
64
|
+
**KeybindHandler**:
|
|
65
|
+
- `help_mode?` - Check if help mode is active
|
|
66
|
+
- `enter_help_mode` - Enter help mode (navigate to `info/` directory)
|
|
67
|
+
- `exit_help_mode` - Exit help mode and return to previous directory
|
|
68
|
+
- `navigate_parent_with_restriction` - Navigate parent with `info/` directory restriction
|
|
69
|
+
- `preview_focused?` - Check if preview pane is focused
|
|
70
|
+
- `focus_preview_pane` - Focus preview pane (file only)
|
|
71
|
+
- `unfocus_preview_pane` - Unfocus preview pane
|
|
72
|
+
- `preview_scroll_offset` - Get current scroll offset
|
|
73
|
+
- `scroll_preview_down` - Scroll preview down one line
|
|
74
|
+
- `scroll_preview_up` - Scroll preview up one line
|
|
75
|
+
- `scroll_preview_page_down` - Scroll preview down half page (Ctrl+D)
|
|
76
|
+
- `scroll_preview_page_up` - Scroll preview up half page (Ctrl+U)
|
|
77
|
+
- `reset_preview_scroll` - Reset scroll position
|
|
78
|
+
- `handle_enter_key` - Handle Enter key (focus preview or navigate)
|
|
79
|
+
- `handle_preview_focus_key` - Handle keys in preview mode
|
|
80
|
+
|
|
81
|
+
**TerminalUI**:
|
|
82
|
+
- `draw_header` - Updated to show help mode indicator
|
|
83
|
+
- `draw_footer` - Updated to show bookmarks with numbers and processing time
|
|
84
|
+
- `draw_file_preview` - Updated to apply scroll offset and show preview mode indicator
|
|
85
|
+
|
|
86
|
+
### Modified Behavior
|
|
87
|
+
|
|
88
|
+
**Keybindings**:
|
|
89
|
+
- `?` - Enter help mode (was: show help dialog)
|
|
90
|
+
- `Enter` - Focus preview pane on files / Navigate on directories (was: navigate only)
|
|
91
|
+
- `h` - Navigate parent with restriction in help mode (was: unrestricted)
|
|
92
|
+
- `ESC` - Exit help mode or unfocus preview pane (was: clear filter only)
|
|
93
|
+
|
|
94
|
+
**Directory Navigation**:
|
|
95
|
+
- `DirectoryListing#initialize` - Save startup directory as `start_directory`
|
|
96
|
+
- `KeybindHandler#goto_start_directory` - Jump to startup directory with `0` key
|
|
97
|
+
|
|
98
|
+
### Layout Constants
|
|
99
|
+
- `HEADER_FOOTER_MARGIN = 3` - Header + Footer (2-line layout)
|
|
100
|
+
|
|
101
|
+
## Usage Guide
|
|
102
|
+
|
|
103
|
+
### Help Mode
|
|
104
|
+
1. Press `?` to enter help mode
|
|
105
|
+
2. Navigate help files using `j/k/h/l` keys
|
|
106
|
+
3. Press `Enter` or `l` to view a help file
|
|
107
|
+
4. Press `h` to go back (restricted to `info/` directory)
|
|
108
|
+
5. Press `ESC` to exit help mode
|
|
109
|
+
|
|
110
|
+
### Preview Scrolling
|
|
111
|
+
1. Select a file with `j/k` keys
|
|
112
|
+
2. Press `Enter` to focus preview pane
|
|
113
|
+
3. Use `j/k` or arrow keys to scroll line by line
|
|
114
|
+
4. Use `Ctrl+D` / `Ctrl+U` for page scrolling
|
|
115
|
+
5. Press `ESC` to return to directory list
|
|
116
|
+
|
|
117
|
+
### Bookmarks
|
|
118
|
+
- `b` - Add current directory to bookmarks
|
|
119
|
+
- `0` - Jump to startup directory
|
|
120
|
+
- `1-9` - Jump to bookmarks 1-9
|
|
121
|
+
- `p` - Enter project mode (browse all bookmarks)
|
|
122
|
+
|
|
123
|
+
## Testing
|
|
124
|
+
|
|
125
|
+
### New Test Files
|
|
126
|
+
- `test/test_help_mode.rb` - Help mode functionality tests
|
|
127
|
+
- `test/test_preview_scroll.rb` - Preview scrolling tests
|
|
128
|
+
|
|
129
|
+
### Test Results
|
|
130
|
+
- **329 tests** passing
|
|
131
|
+
- **1444 assertions**
|
|
132
|
+
- **0 failures**
|
|
133
|
+
- **0 errors**
|
|
134
|
+
|
|
135
|
+
## Compatibility
|
|
136
|
+
|
|
137
|
+
- Ruby 3.0 or higher
|
|
138
|
+
- Maintains compatibility with existing configuration files
|
|
139
|
+
- Maintains compatibility with existing bookmark data
|
|
140
|
+
- All help files now in English (breaking change for Japanese users)
|
|
141
|
+
|
|
142
|
+
## Known Issues
|
|
143
|
+
|
|
144
|
+
None
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
**Full Changelog**: v0.21.0...v0.30.0
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Changelog - v0.31.0
|
|
2
|
+
|
|
3
|
+
## 🚀 New Features
|
|
4
|
+
|
|
5
|
+
### Experimental Native Scanner Implementation
|
|
6
|
+
|
|
7
|
+
Added high-performance directory scanning with Rust/Go implementations. By default, uses stable Ruby implementation with optional native implementations available via command-line options.
|
|
8
|
+
|
|
9
|
+
#### Implementation Languages
|
|
10
|
+
- **Rust implementation** (`lib_rust/scanner/`): Fastest, memory-safe
|
|
11
|
+
- **Go implementation** (`lib_go/scanner/`): Fast, excellent concurrency
|
|
12
|
+
- **Ruby implementation** (default): Stable, no dependencies
|
|
13
|
+
|
|
14
|
+
#### NativeScanner Abstraction Layer
|
|
15
|
+
- `lib/rufio/native_scanner.rb`: Unified interface independent of implementation
|
|
16
|
+
- Automatic fallback (falls back to Ruby if native implementation unavailable)
|
|
17
|
+
|
|
18
|
+
#### Launch Options
|
|
19
|
+
```bash
|
|
20
|
+
# Default (Ruby implementation)
|
|
21
|
+
rufio
|
|
22
|
+
|
|
23
|
+
# Enable native implementation (auto-detect: Rust > Go > Ruby)
|
|
24
|
+
rufio --native
|
|
25
|
+
rufio --native=auto
|
|
26
|
+
|
|
27
|
+
# Force Rust implementation
|
|
28
|
+
rufio --native=rust
|
|
29
|
+
|
|
30
|
+
# Force Go implementation
|
|
31
|
+
rufio --native=go
|
|
32
|
+
|
|
33
|
+
# Environment variable control
|
|
34
|
+
RUFIO_NATIVE=rust rufio
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### Priority
|
|
38
|
+
- **Default**: Ruby (stability focused)
|
|
39
|
+
- **`--native=auto`**: Rust > Go > Ruby
|
|
40
|
+
- **`--native=rust`**: Rust (fallback to Ruby if unavailable)
|
|
41
|
+
- **`--native=go`**: Go (fallback to Ruby if unavailable)
|
|
42
|
+
|
|
43
|
+
## 🔧 Improvements
|
|
44
|
+
|
|
45
|
+
### GitHub Actions CI/CD
|
|
46
|
+
- **Build**: Automatically build native libraries on 3 OSes (Linux, macOS, Windows)
|
|
47
|
+
- **Test**: Run tests on all platforms (both Ruby fallback and native implementations)
|
|
48
|
+
- **Release**: Auto-build and publish gem on tag push, attach binaries
|
|
49
|
+
|
|
50
|
+
### Development Environment
|
|
51
|
+
- `.gitignore`: Ignore build artifacts (`target/`, `*.dylib`, `*.so`, `*.dll`, etc.)
|
|
52
|
+
- gemspec: Configure to include native libraries in gem (optional)
|
|
53
|
+
|
|
54
|
+
### Command-Line Argument Processing
|
|
55
|
+
- Added `--native` option
|
|
56
|
+
- Improved argument parser (accurate path and option discrimination)
|
|
57
|
+
- Added native scanner description to `--help`
|
|
58
|
+
|
|
59
|
+
## 📦 Dependencies
|
|
60
|
+
|
|
61
|
+
### Ruby Dependencies (unchanged)
|
|
62
|
+
- io-console ~> 0.6
|
|
63
|
+
- pastel ~> 0.8
|
|
64
|
+
- tty-cursor ~> 0.7
|
|
65
|
+
- tty-screen ~> 0.8
|
|
66
|
+
- ffi (only when using native scanner)
|
|
67
|
+
|
|
68
|
+
### Build-time Dependencies (optional)
|
|
69
|
+
- **Rust**: cargo, rustc (to build Rust implementation)
|
|
70
|
+
- **Go**: go 1.21+ (to build Go implementation)
|
|
71
|
+
|
|
72
|
+
## 🧪 Tests
|
|
73
|
+
|
|
74
|
+
Added new tests:
|
|
75
|
+
- `test/test_rust_scanner.rb`: Rust scanner tests
|
|
76
|
+
- `test/test_go_scanner.rb`: Go scanner tests
|
|
77
|
+
- `test/test_native_scanner.rb`: NativeScanner abstraction layer tests
|
|
78
|
+
- Verify default mode is Ruby
|
|
79
|
+
- Mode switching tests
|
|
80
|
+
- Auto-detection tests
|
|
81
|
+
- Fallback behavior tests
|
|
82
|
+
|
|
83
|
+
All tests passing: 279+ runs, 1299+ assertions, 0 failures, 0 errors
|
|
84
|
+
|
|
85
|
+
## 📝 Documentation
|
|
86
|
+
|
|
87
|
+
- README.md: Added launch options documentation
|
|
88
|
+
- Help message: Detailed `--native` option description
|
|
89
|
+
|
|
90
|
+
## 🔒 Compatibility
|
|
91
|
+
|
|
92
|
+
- **Backward compatibility**: Fully maintained (default is Ruby implementation)
|
|
93
|
+
- **Native libraries**: Optional (works without them)
|
|
94
|
+
- **Platforms**: Linux, macOS, Windows supported
|
|
95
|
+
|
|
96
|
+
## 📌 Notes
|
|
97
|
+
|
|
98
|
+
### Experimental Feature
|
|
99
|
+
Rust/Go implementations are experimental:
|
|
100
|
+
- Not used by default (requires `--native` option)
|
|
101
|
+
- Thorough testing recommended for production use
|
|
102
|
+
- Use default Ruby implementation if issues occur
|
|
103
|
+
|
|
104
|
+
### Build Instructions
|
|
105
|
+
|
|
106
|
+
#### Rust Implementation
|
|
107
|
+
```bash
|
|
108
|
+
cd lib_rust/scanner
|
|
109
|
+
cargo build --release
|
|
110
|
+
make install
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
#### Go Implementation
|
|
114
|
+
```bash
|
|
115
|
+
cd lib_go/scanner
|
|
116
|
+
make install
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 🙏 Acknowledgments
|
|
120
|
+
|
|
121
|
+
Native Rust/Go implementations enable faster scanning of large directories. We welcome your feedback.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
Release Date: 2026-01-01
|
data/README.md
CHANGED
|
@@ -21,6 +21,9 @@ rufioは、Yaziにインスパイアされたターミナル上で動作する
|
|
|
21
21
|
- **マルチプラットフォーム**: macOS、Linux、Windowsで動作
|
|
22
22
|
- **外部エディタ連携**: お気に入りのエディタでファイルを開く
|
|
23
23
|
- **ヘルスチェック**: システム依存関係の確認機能
|
|
24
|
+
- **ステータスバー**: 処理時間、現在時刻、バージョン情報をリアルタイム表示
|
|
25
|
+
- **ブックマーク一覧表示**: フッタに1-9のブックマークを番号付きで表示
|
|
26
|
+
- **統合ヘルプシステム**: ?キーでキーバインド一覧とお知らせを表示
|
|
24
27
|
|
|
25
28
|
## インストール
|
|
26
29
|
|
|
@@ -43,6 +46,61 @@ rufio # カレントディレクトリで起動
|
|
|
43
46
|
rufio /path/to # 指定したディレクトリで起動
|
|
44
47
|
```
|
|
45
48
|
|
|
49
|
+
### ネイティブスキャナー(実験的機能)
|
|
50
|
+
|
|
51
|
+
rufio v0.31.0以降では、高速なディレクトリスキャンのためのネイティブ実装(Rust/Go)をサポートしています。デフォルトは安定したRuby実装を使用し、オプションでネイティブ実装に切り替え可能です。
|
|
52
|
+
|
|
53
|
+
#### 起動オプション
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# デフォルト(Ruby実装 - 安定)
|
|
57
|
+
rufio
|
|
58
|
+
|
|
59
|
+
# ネイティブ実装を有効化(自動検出: Rust > Go > Ruby)
|
|
60
|
+
rufio --native
|
|
61
|
+
rufio --native=auto
|
|
62
|
+
|
|
63
|
+
# Rust実装を強制使用
|
|
64
|
+
rufio --native=rust
|
|
65
|
+
rufio --native rust /path/to/dir
|
|
66
|
+
|
|
67
|
+
# Go実装を強制使用
|
|
68
|
+
rufio --native=go
|
|
69
|
+
rufio --native go /path/to/dir
|
|
70
|
+
|
|
71
|
+
# 環境変数でも制御可能
|
|
72
|
+
RUFIO_NATIVE=rust rufio
|
|
73
|
+
RUFIO_NATIVE=go rufio /path/to/dir
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### ネイティブ実装について
|
|
77
|
+
|
|
78
|
+
- **Rust実装**: 最も高速でメモリ安全。推奨。
|
|
79
|
+
- **Go実装**: 高速で並行処理に優れる。
|
|
80
|
+
- **Ruby実装** (デフォルト): 依存なし、安定動作保証。
|
|
81
|
+
|
|
82
|
+
#### ビルド方法
|
|
83
|
+
|
|
84
|
+
ネイティブ実装を使用するには、事前にビルドが必要です:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Rust実装のビルド
|
|
88
|
+
cd lib_rust/scanner
|
|
89
|
+
cargo build --release
|
|
90
|
+
make install
|
|
91
|
+
|
|
92
|
+
# Go実装のビルド
|
|
93
|
+
cd lib_go/scanner
|
|
94
|
+
make install
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### 注意事項
|
|
98
|
+
|
|
99
|
+
- ネイティブ実装は実験的機能です
|
|
100
|
+
- デフォルトではRuby実装を使用(`--native`オプションなし)
|
|
101
|
+
- ネイティブライブラリがない場合、自動的にRuby実装にフォールバック
|
|
102
|
+
- gemインストール時はネイティブライブラリが含まれます(ビルド不要)
|
|
103
|
+
|
|
46
104
|
### ヘルスチェック
|
|
47
105
|
|
|
48
106
|
```bash
|
|
@@ -113,6 +171,7 @@ rufio --help # ヘルプメッセージを表示
|
|
|
113
171
|
| --------- | ------------------------------------ |
|
|
114
172
|
| `b` | 現在のディレクトリをブックマークに追加 |
|
|
115
173
|
| `p` | プロジェクトモードに入る |
|
|
174
|
+
| `0` | 起動したディレクトリに移動 |
|
|
116
175
|
| `1`-`9` | 対応する番号のブックマークに移動 |
|
|
117
176
|
|
|
118
177
|
#### zoxide連携機能
|
|
@@ -130,6 +189,12 @@ rufio --help # ヘルプメッセージを表示
|
|
|
130
189
|
| `Enter`| コマンドを実行(コマンドモード中) |
|
|
131
190
|
| `ESC` | コマンドモードをキャンセル(コマンドモード中) |
|
|
132
191
|
|
|
192
|
+
#### ヘルプ
|
|
193
|
+
|
|
194
|
+
| キー | 機能 |
|
|
195
|
+
| ---- | ---------------------------------- |
|
|
196
|
+
| `?` | キーバインド一覧とお知らせを表示 |
|
|
197
|
+
|
|
133
198
|
#### システム操作
|
|
134
199
|
|
|
135
200
|
| キー | 機能 |
|
data/bin/rufio
CHANGED
|
@@ -6,27 +6,98 @@ require_relative '../lib/rufio'
|
|
|
6
6
|
# プラグインを読み込む
|
|
7
7
|
Rufio::PluginManager.load_all
|
|
8
8
|
|
|
9
|
-
#
|
|
9
|
+
# コマンドライン引数のパース
|
|
10
|
+
native_mode = nil
|
|
11
|
+
start_directory = nil
|
|
12
|
+
skip_next = false
|
|
13
|
+
|
|
14
|
+
ARGV.each_with_index do |arg, idx|
|
|
15
|
+
if skip_next
|
|
16
|
+
skip_next = false
|
|
17
|
+
next
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
case arg
|
|
21
|
+
when '--native'
|
|
22
|
+
# 次の引数がモード指定かチェック
|
|
23
|
+
if idx + 1 < ARGV.length && !ARGV[idx + 1].start_with?('--') && !ARGV[idx + 1].start_with?('/')
|
|
24
|
+
next_arg = ARGV[idx + 1]
|
|
25
|
+
if %w[rust go auto ruby].include?(next_arg)
|
|
26
|
+
native_mode = next_arg
|
|
27
|
+
skip_next = true
|
|
28
|
+
else
|
|
29
|
+
native_mode = 'auto'
|
|
30
|
+
end
|
|
31
|
+
else
|
|
32
|
+
native_mode = 'auto'
|
|
33
|
+
end
|
|
34
|
+
when /^--native=(rust|go|auto|ruby)$/
|
|
35
|
+
native_mode = $1
|
|
36
|
+
when '-c', '--check-health', '--help', '-h'
|
|
37
|
+
# これらは後で処理
|
|
38
|
+
when /^--/
|
|
39
|
+
# 未知のオプションは無視
|
|
40
|
+
else
|
|
41
|
+
# 最初の非オプション引数をディレクトリとして扱う
|
|
42
|
+
start_directory ||= arg
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# ネイティブスキャナーモードを設定(native_scannerが存在する場合のみ)
|
|
47
|
+
if native_mode && defined?(Rufio::NativeScanner)
|
|
48
|
+
Rufio::NativeScanner.mode = native_mode
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# 環境変数でも制御可能
|
|
52
|
+
if ENV['RUFIO_NATIVE'] && defined?(Rufio::NativeScanner)
|
|
53
|
+
Rufio::NativeScanner.mode = ENV['RUFIO_NATIVE']
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# コマンド処理
|
|
10
57
|
if ARGV.include?('--check-health') || ARGV.include?('-c')
|
|
11
58
|
# ヘルスチェック実行
|
|
12
59
|
health_checker = Rufio::HealthChecker.new
|
|
13
60
|
success = health_checker.run_check
|
|
14
61
|
exit(success ? 0 : 1)
|
|
15
|
-
elsif ARGV.include?('--help')
|
|
62
|
+
elsif ARGV.include?('--help') || ARGV.include?('-h')
|
|
16
63
|
puts "rufio - Terminal-based file manager"
|
|
17
64
|
puts ""
|
|
18
65
|
puts "Usage:"
|
|
19
|
-
puts " rufio [DIRECTORY]
|
|
20
|
-
puts "
|
|
21
|
-
puts "
|
|
66
|
+
puts " rufio [OPTIONS] [DIRECTORY]"
|
|
67
|
+
puts ""
|
|
68
|
+
puts "Options:"
|
|
69
|
+
puts " -c, --check-health Check system dependencies"
|
|
70
|
+
puts " -h, --help Show this help message"
|
|
71
|
+
if defined?(Rufio::NativeScanner)
|
|
72
|
+
puts " --native[=MODE] Enable native scanner (experimental)"
|
|
73
|
+
puts " MODE: auto|rust|go (default: auto)"
|
|
74
|
+
puts ""
|
|
75
|
+
puts "Native Scanner:"
|
|
76
|
+
puts " By default, rufio uses Ruby implementation for stability."
|
|
77
|
+
puts " Native scanners (Rust/Go) are experimental and can be enabled with --native."
|
|
78
|
+
puts ""
|
|
79
|
+
puts " --native Auto-detect (Rust > Go > Ruby)"
|
|
80
|
+
puts " --native=rust Use Rust implementation"
|
|
81
|
+
puts " --native=go Use Go implementation"
|
|
82
|
+
puts " --native=auto Same as --native"
|
|
83
|
+
puts " --native=ruby Use Ruby implementation (default)"
|
|
84
|
+
puts ""
|
|
85
|
+
puts " Environment variable: RUFIO_NATIVE=rust|go|auto"
|
|
86
|
+
end
|
|
22
87
|
puts ""
|
|
23
88
|
puts "Examples:"
|
|
24
|
-
puts " rufio
|
|
25
|
-
puts " rufio /path/to/dir
|
|
26
|
-
|
|
89
|
+
puts " rufio # Start in current directory"
|
|
90
|
+
puts " rufio /path/to/dir # Start in specific directory"
|
|
91
|
+
if defined?(Rufio::NativeScanner)
|
|
92
|
+
puts " rufio --native # Use native scanner (auto-detect)"
|
|
93
|
+
puts " rufio --native=rust # Use Rust scanner"
|
|
94
|
+
puts " rufio --native rust /tmp # Use Rust scanner in /tmp"
|
|
95
|
+
puts " RUFIO_NATIVE=rust rufio # Use Rust via environment variable"
|
|
96
|
+
end
|
|
97
|
+
puts " rufio -c # Check dependencies"
|
|
27
98
|
exit(0)
|
|
28
99
|
else
|
|
29
|
-
start_directory
|
|
100
|
+
start_directory ||= Dir.pwd
|
|
30
101
|
|
|
31
102
|
# アプリケーション開始
|
|
32
103
|
app = Rufio::Application.new(start_directory)
|
data/info/help.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# rufio Help
|
|
2
|
+
|
|
3
|
+
**rufio** is a terminal-based file manager inspired by Yazi.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Basic Operations](#basic-operations)
|
|
8
|
+
- [Navigation](#navigation)
|
|
9
|
+
- [File Operations](#file-operations)
|
|
10
|
+
- [File Selection & Bulk Operations](#file-selection--bulk-operations)
|
|
11
|
+
- [Filtering & Search](#filtering--search)
|
|
12
|
+
- [Bookmarks](#bookmarks)
|
|
13
|
+
- [Other Features](#other-features)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Basic Operations
|
|
18
|
+
|
|
19
|
+
### Navigation
|
|
20
|
+
|
|
21
|
+
| Key | Action |
|
|
22
|
+
|-----|--------|
|
|
23
|
+
| `j` or `↓` | Move down one item |
|
|
24
|
+
| `k` or `↑` | Move up one item |
|
|
25
|
+
| `h` or `←` | Go to parent directory |
|
|
26
|
+
| `l`, `Enter`, or `→` | Enter directory / Select file |
|
|
27
|
+
| `g` | Jump to top of list |
|
|
28
|
+
| `G` | Jump to bottom of list |
|
|
29
|
+
|
|
30
|
+
### File Operations
|
|
31
|
+
|
|
32
|
+
| Key | Action |
|
|
33
|
+
|-----|--------|
|
|
34
|
+
| `o` | Open file with external editor |
|
|
35
|
+
| `e` | Open in file explorer |
|
|
36
|
+
| `R` | Refresh directory contents |
|
|
37
|
+
| `r` | Rename file or directory |
|
|
38
|
+
| `d` | Delete file or directory (with confirmation) |
|
|
39
|
+
| `a` | Create new file |
|
|
40
|
+
| `A` | Create new directory |
|
|
41
|
+
|
|
42
|
+
### File Selection & Bulk Operations
|
|
43
|
+
|
|
44
|
+
| Key | Action |
|
|
45
|
+
|-----|--------|
|
|
46
|
+
| `Space` | Toggle file/directory selection |
|
|
47
|
+
| `m` | Move selected items to current directory |
|
|
48
|
+
| `c` | Copy selected items to current directory |
|
|
49
|
+
| `x` | Delete selected items |
|
|
50
|
+
|
|
51
|
+
### Filtering & Search
|
|
52
|
+
|
|
53
|
+
| Key | Action |
|
|
54
|
+
|-----|--------|
|
|
55
|
+
| `f` | Start filter mode |
|
|
56
|
+
| `s` | Search file names with fzf |
|
|
57
|
+
| `F` | Search file contents with rga (ripgrep-all) |
|
|
58
|
+
|
|
59
|
+
**Filter Mode:**
|
|
60
|
+
- Type characters to filter files in real-time
|
|
61
|
+
- Press `Enter` to apply filter and exit filter mode
|
|
62
|
+
- Press `ESC` to cancel and clear filter
|
|
63
|
+
|
|
64
|
+
### Bookmarks
|
|
65
|
+
|
|
66
|
+
| Key | Action |
|
|
67
|
+
|-----|--------|
|
|
68
|
+
| `b` | Add current directory to bookmarks |
|
|
69
|
+
| `0` | Jump to startup directory |
|
|
70
|
+
| `1-9` | Jump to bookmark 1-9 |
|
|
71
|
+
| `p` | Enter project mode (browse bookmarks) |
|
|
72
|
+
|
|
73
|
+
**Project Mode:**
|
|
74
|
+
- Browse all bookmarks with normal navigation keys
|
|
75
|
+
- Press `Space` to select a bookmark and jump to it
|
|
76
|
+
- Press `ESC` to exit project mode
|
|
77
|
+
|
|
78
|
+
### Other Features
|
|
79
|
+
|
|
80
|
+
| Key | Action |
|
|
81
|
+
|-----|--------|
|
|
82
|
+
| `z` | Navigate using zoxide history |
|
|
83
|
+
| `:` | Enter command mode |
|
|
84
|
+
| `?` | Enter help mode (this mode) |
|
|
85
|
+
| `ESC` | Exit help mode / Cancel filter |
|
|
86
|
+
| `q` | Quit rufio |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Help Mode
|
|
91
|
+
|
|
92
|
+
You are currently in **Help Mode**. In this mode:
|
|
93
|
+
|
|
94
|
+
- Navigate through help files using normal keys (`j/k/h/l`)
|
|
95
|
+
- Press `l` or `Enter` to view a help file
|
|
96
|
+
- Press `h` to go back (restricted to `info/` directory)
|
|
97
|
+
- Press `ESC` to exit help mode and return to your previous directory
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Tips
|
|
102
|
+
|
|
103
|
+
1. **Quick navigation**: Use `g` and `G` to jump to top/bottom
|
|
104
|
+
2. **Bulk operations**: Select multiple files with `Space`, then use `m/c/x`
|
|
105
|
+
3. **Filter + Search**: Use `f` for real-time filtering, `s` for fuzzy search
|
|
106
|
+
4. **Bookmarks**: Save frequently used directories with `b`, access with `1-9`
|
|
107
|
+
5. **Project mode**: Press `p` to see all bookmarks at once
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
For more information, visit: https://github.com/masisz/rufio
|
data/info/keybindings.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Keybindings Reference
|
|
2
|
+
|
|
3
|
+
Complete reference of all keyboard shortcuts in **rufio**.
|
|
4
|
+
|
|
5
|
+
## Navigation
|
|
6
|
+
|
|
7
|
+
| Key | Action |
|
|
8
|
+
|-----|--------|
|
|
9
|
+
| `j` / `↓` | Move down |
|
|
10
|
+
| `k` / `↑` | Move up |
|
|
11
|
+
| `h` / `←` | Go to parent directory |
|
|
12
|
+
| `l` / `→` / `Enter` | Enter directory or select file |
|
|
13
|
+
| `g` | Jump to top of list |
|
|
14
|
+
| `G` | Jump to bottom of list |
|
|
15
|
+
|
|
16
|
+
## File Operations
|
|
17
|
+
|
|
18
|
+
| Key | Action |
|
|
19
|
+
|-----|--------|
|
|
20
|
+
| `o` | Open file with external editor |
|
|
21
|
+
| `e` | Open in file explorer (system default) |
|
|
22
|
+
| `R` | Refresh directory contents |
|
|
23
|
+
| `r` | Rename file or directory |
|
|
24
|
+
| `d` | Delete file or directory (with confirmation) |
|
|
25
|
+
| `a` | Create new file |
|
|
26
|
+
| `A` | Create new directory |
|
|
27
|
+
|
|
28
|
+
## File Selection
|
|
29
|
+
|
|
30
|
+
| Key | Action |
|
|
31
|
+
|-----|--------|
|
|
32
|
+
| `Space` | Toggle selection on current item |
|
|
33
|
+
| `m` | Move selected items to current directory |
|
|
34
|
+
| `c` | Copy selected items to current directory |
|
|
35
|
+
| `x` | Delete selected items |
|
|
36
|
+
|
|
37
|
+
## Filtering & Search
|
|
38
|
+
|
|
39
|
+
| Key | Action |
|
|
40
|
+
|-----|--------|
|
|
41
|
+
| `f` | Enter filter mode (type to filter) |
|
|
42
|
+
| `s` | Search file names with fzf |
|
|
43
|
+
| `F` | Search file contents with rga |
|
|
44
|
+
|
|
45
|
+
## Bookmarks
|
|
46
|
+
|
|
47
|
+
| Key | Action |
|
|
48
|
+
|-----|--------|
|
|
49
|
+
| `b` | Add current directory to bookmarks |
|
|
50
|
+
| `0` | Jump to startup directory |
|
|
51
|
+
| `1` | Jump to bookmark 1 |
|
|
52
|
+
| `2` | Jump to bookmark 2 |
|
|
53
|
+
| `3` | Jump to bookmark 3 |
|
|
54
|
+
| `4` | Jump to bookmark 4 |
|
|
55
|
+
| `5` | Jump to bookmark 5 |
|
|
56
|
+
| `6` | Jump to bookmark 6 |
|
|
57
|
+
| `7` | Jump to bookmark 7 |
|
|
58
|
+
| `8` | Jump to bookmark 8 |
|
|
59
|
+
| `9` | Jump to bookmark 9 |
|
|
60
|
+
| `p` | Enter project mode (browse all bookmarks) |
|
|
61
|
+
|
|
62
|
+
## Other
|
|
63
|
+
|
|
64
|
+
| Key | Action |
|
|
65
|
+
|-----|--------|
|
|
66
|
+
| `z` | Navigate using zoxide history |
|
|
67
|
+
| `:` | Enter command mode |
|
|
68
|
+
| `?` | Enter help mode |
|
|
69
|
+
| `ESC` | Exit current mode (help/filter/project) |
|
|
70
|
+
| `q` | Quit rufio |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Mode-Specific Keys
|
|
75
|
+
|
|
76
|
+
### Filter Mode
|
|
77
|
+
- **Any character**: Add to filter query
|
|
78
|
+
- **Backspace**: Remove last character
|
|
79
|
+
- **Enter**: Apply filter and exit filter mode
|
|
80
|
+
- **ESC**: Cancel filter and exit filter mode
|
|
81
|
+
|
|
82
|
+
### Project Mode
|
|
83
|
+
- **j/k**: Navigate through bookmarks
|
|
84
|
+
- **Space**: Select bookmark and jump to directory
|
|
85
|
+
- **ESC**: Exit project mode
|
|
86
|
+
|
|
87
|
+
### Help Mode
|
|
88
|
+
- **j/k/h/l**: Navigate help files
|
|
89
|
+
- **ESC**: Exit help mode and return to previous directory
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Tips
|
|
94
|
+
|
|
95
|
+
- **Vim users**: Navigation keys (`hjkl`) work exactly like Vim
|
|
96
|
+
- **Selection**: Use `Space` to mark multiple files, then operate on all at once
|
|
97
|
+
- **Quick access**: Number keys `1-9` provide instant access to bookmarks
|
|
98
|
+
- **Filtering**: Press `f` and start typing for real-time filtering
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
*Press `?` anytime to return to help mode*
|