rufio 1.1.0 → 1.4.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.md +50 -0
- data/README.md +26 -297
- data/README_ja.md +24 -261
- data/Rakefile +14 -1
- data/bin/rufio +31 -2
- data/docs/fast_zip_design_ja.md +167 -0
- data/docs/guide.md +410 -0
- data/docs/guide_ja.md +410 -0
- data/info/help.md +54 -17
- data/info/keybindings.md +50 -22
- data/info/welcome.md +14 -5
- data/lib/rufio/application.rb +12 -1
- data/lib/rufio/archive_controller.rb +211 -0
- data/lib/rufio/background_command_executor.rb +9 -0
- data/lib/rufio/background_status.rb +49 -0
- data/lib/rufio/bookmark_controller.rb +38 -121
- data/lib/rufio/bookmark_manager.rb +77 -331
- data/lib/rufio/command_completion.rb +28 -2
- data/lib/rufio/command_history.rb +5 -2
- data/lib/rufio/command_mode.rb +60 -134
- data/lib/rufio/command_mode_ui.rb +4 -42
- data/lib/rufio/config.rb +88 -136
- data/lib/rufio/config_loader.rb +4 -11
- data/lib/rufio/dialog_renderer.rb +90 -152
- data/lib/rufio/dialog_support.rb +69 -0
- data/lib/rufio/document_text_extractor.rb +167 -0
- data/lib/rufio/file_operation_controller.rb +49 -222
- data/lib/rufio/file_operations.rb +28 -6
- data/lib/rufio/file_preview.rb +46 -2
- data/lib/rufio/global_search.rb +125 -13
- data/lib/rufio/help_menu.rb +19 -7
- data/lib/rufio/interpreter_resolver.rb +6 -11
- data/lib/rufio/job_manager.rb +2 -5
- data/lib/rufio/key_input.rb +77 -0
- data/lib/rufio/keybind_handler.rb +83 -116
- data/lib/rufio/local_script_scanner.rb +6 -18
- data/lib/rufio/native/aarch64-linux-gnu/librufio_zig.so +0 -0
- data/lib/rufio/native/aarch64-linux-musl/librufio_zig.so +0 -0
- data/lib/rufio/native/aarch64-macos/librufio_zig.dylib +0 -0
- data/lib/rufio/native/aarch64-windows/rufio_zig.dll +0 -0
- data/lib/rufio/native/x86_64-linux-gnu/librufio_zig.so +0 -0
- data/lib/rufio/native/x86_64-linux-musl/librufio_zig.so +0 -0
- data/lib/rufio/native/x86_64-macos/librufio_zig.dylib +0 -0
- data/lib/rufio/native/x86_64-windows/rufio_zig.dll +0 -0
- data/lib/rufio/native_content_search.rb +153 -0
- data/lib/rufio/native_scanner.rb +13 -68
- data/lib/rufio/native_scanner_zig.rb +106 -56
- data/lib/rufio/native_zip.rb +121 -0
- data/lib/rufio/navigation_controller.rb +20 -26
- data/lib/rufio/path_jump.rb +55 -0
- data/lib/rufio/screen.rb +2 -12
- data/lib/rufio/script_executor.rb +6 -73
- data/lib/rufio/script_file.rb +44 -0
- data/lib/rufio/script_path_manager.rb +9 -43
- data/lib/rufio/script_runner.rb +13 -50
- data/lib/rufio/search_controller.rb +1 -1
- data/lib/rufio/shell_command_completion.rb +1 -5
- data/lib/rufio/shell_init.rb +90 -0
- data/lib/rufio/task_status.rb +5 -1
- data/lib/rufio/terminal_ui.rb +84 -298
- data/lib/rufio/text_utils.rb +26 -3
- data/lib/rufio/ui_renderer.rb +73 -45
- data/lib/rufio/version.rb +1 -1
- data/lib/rufio/zip_archive.rb +314 -0
- data/lib/rufio/zip_extractor.rb +346 -0
- data/lib/rufio/zip_writer.rb +268 -0
- data/lib/rufio/zoxide_integration.rb +5 -43
- data/lib/rufio.rb +6 -0
- data/lib_zig/rufio_native/Makefile +54 -17
- data/lib_zig/rufio_native/bench.sh +36 -0
- data/lib_zig/rufio_native/build.zig +32 -35
- data/lib_zig/rufio_native/src/cli.zig +99 -0
- data/lib_zig/rufio_native/src/main.zig +187 -83
- data/lib_zig/rufio_native/src/os.zig +889 -0
- data/lib_zig/rufio_native/src/search.zig +919 -0
- data/lib_zig/rufio_native/src/search_test.zig +88 -0
- data/lib_zig/rufio_native/src/zip.zig +482 -0
- metadata +128 -3
- data/lib/rufio/native/rufio_zig.bundle +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d03b8da1539c55090e70b9b255fdd8a19e6621a5217da447904b6ff37db21b9a
|
|
4
|
+
data.tar.gz: be3e1764c29da9cd392e84f9fb85f8afed29f1582cc26570125de2171fb5d0fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6549958abeefb479c647fde946cbb100c4283a2f3f7d3d88694c3edf41dab4e3eea6bbf0cd6813f806f74d02fded4c279a13b313a46873f5b38a22ab6f643615
|
|
7
|
+
data.tar.gz: d8d422b37676ffaef5116b4e78ec3fd49855633c0b1dd22f04e52da3125fb83a0b9108d1e43ce559fd964e66f89965167290246176a6413e2df2fdc437b64f25
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,56 @@ All notable changes to rufio will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- G mode supports `Ctrl+J` / `Ctrl+K` to select the next / previous result; Enter (CR) opens the selected result
|
|
12
|
+
|
|
13
|
+
## [1.4.0] - 2026-11-02
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- `P` opens a fullscreen preview of the selected file that hides the file list; `j` / `k` and `Ctrl+D` / `Ctrl+U` scroll it, the mouse wheel scrolls it, and `ESC` returns to the file list. In Logs mode `P` opens a log the same way
|
|
17
|
+
- `:cd <path>` in command mode goes to a pasted path. A file path opens its folder and selects the file, relative paths start from the current directory, `cd -` returns to the previous directory, and `Tab` completes directory names. Surrounding quotes, a trailing newline, `\ ` escapes and `file://` URLs from copied paths are accepted
|
|
18
|
+
- Floating dialogs show scroll direction indicators when their content is longer than the dialog
|
|
19
|
+
- `docs/guide.md` / `docs/guide_ja.md` collect the full usage guide; the README now keeps only an overview and the main keys
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- `Enter` only enters directories; it no longer moves focus to the preview for files (use `P`)
|
|
23
|
+
- Copying an item whose name already exists in the destination creates a numbered copy (`name_1.ext`, `dir_1`, ...) instead of failing. Moving still refuses to overwrite
|
|
24
|
+
- The help menu and info docs list the current keys and modes
|
|
25
|
+
|
|
26
|
+
## [1.3.0] - 2026-11-01
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
- Preview ZIP archives as an entry list (size, method, modified time, name), including ZIP64, UTF-8 / CP932 file names, and the Info-ZIP Unicode Path extra field. The list is read from the central directory without extracting files
|
|
30
|
+
- Press `z` with items selected in Files mode to extract them when every selected item is a `.zip` file (each into `<name>/`, numbered if the name is taken) or otherwise compress them into one `.zip` in the current directory. The work runs as a background job with progress in Jobs mode, can be cancelled, removes a partially extracted folder on failure, and refreshes the file list when done. Encrypted entries are skipped. Without a selection, `z` still opens zoxide history
|
|
31
|
+
- The bundled Zig library adds a ZIP engine that decompresses entries and compresses files of 1 MiB or more in parallel outside the GVL, rebuilt for all eight bundled platforms. Ruby still validates archives, chooses paths, and renames files, so the safety checks are shared. On 8 × 64 MB text files with 4 CPUs it compressed about 4.6x and extracted about 3.2x faster than the Ruby implementation. `RUFIO_NATIVE_ZIP=0` disables it, and older libraries without the ZIP functions fall back to Ruby
|
|
32
|
+
- `Rufio::ZipExtractor` extracts Stored and Deflate entries after validating the whole archive first: it rejects path traversal, absolute paths, overlapping entries, and archives over size, entry count, or compression ratio limits, skips symlink and encrypted entries, never follows existing symlinks, verifies CRC-32, refuses to overwrite files unless asked, and leaves no partial files
|
|
33
|
+
- `Rufio::ZipWriter` creates ZIP archives with UTF-8 names, falls back to Stored for incompressible files, uses ZIP64 for large files and more than 65,535 entries, skips symlinks, and writes through a temporary file
|
|
34
|
+
|
|
35
|
+
## [1.2.0] - 2026-10-31
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
- G mode content search reads PDF (`pdf-reader`), Excel `.xlsx` (`roo`), and PowerPoint `.pptx` (Rubyzip and XML) directly from Ruby, without Python or external conversion commands
|
|
39
|
+
- Document results show the PDF page, Excel sheet and cell, or PowerPoint slide alongside matching text; Enter still locates the source file in Files mode
|
|
40
|
+
- A bounded in-memory document text cache avoids re-extracting unchanged documents when editing the query; file changes invalidate cached text, and corrupt or encrypted documents report errors without stopping other searches
|
|
41
|
+
|
|
42
|
+
- G mode content search runs on a bundled Zig engine: parallel directory walking, SIMD literal matching, and a revalidated in-memory file cache make the first search about 1.8x and repeated searches about 10x faster than `rg` on a 31k-file tree; queries with non-ASCII cased letters still use the Ruby search, and `RUFIO_NATIVE_SEARCH=0` disables the engine
|
|
43
|
+
- G mode highlights the matching text (case-insensitive, every occurrence) in file name results and content snippets
|
|
44
|
+
- `T` quits rufio and moves the shell to the current directory; `rufio --shell-init [bash|zsh|fish|powershell]` prints the `rf` shell function that does the move (PowerShell on Windows, the login shell elsewhere), and `--choosedir FILE` receives the directory
|
|
45
|
+
- The gem bundles the Zig library for macOS (arm64/x86_64), Linux (x86_64/aarch64, glibc 2.17+ and musl), and Windows (x64/arm64); unsupported platforms fall back to Ruby automatically
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
- Files mode shows the current path on its own top row above the bookmark list (full path with `~` for home, shortened from the left when too long) instead of on the bottom tab line; Jobs mode keeps the path on the tab line
|
|
49
|
+
- Rebuild the Zig library with Zig 0.17 (`make -C lib_zig/rufio_native dist`); bundled binaries live in `lib/rufio/native/<platform>/`
|
|
50
|
+
- Consolidate UI rendering, dialog drawing, file operations, bookmark flows, native scanner helpers, shell execution, and localized message definitions, removing dead code and runtime warnings
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
- Windows: dialogs no longer compete with the input thread for keys, so bookmark names and other dialog input no longer need every key pressed twice
|
|
54
|
+
- Windows: wait longer for arrow key escape sequences in G mode so arrow keys no longer close G mode as a lone ESC
|
|
55
|
+
- Windows: DSL shell command timeouts stop the process with KILL instead of failing with `Invalid argument` on TERM and leaving it running
|
|
56
|
+
- Restore the scanner mode after native scanner tests so test order no longer affects normal directory listings
|
|
57
|
+
|
|
8
58
|
## [1.1.0] - 2026-10-25
|
|
9
59
|
|
|
10
60
|
### Added
|
data/README.md
CHANGED
|
@@ -32,8 +32,10 @@ rufio brings finding files, running scripts, and checking results together in on
|
|
|
32
32
|
### As a File Manager
|
|
33
33
|
|
|
34
34
|
- **Vim-like Key Bindings**: Intuitive navigation
|
|
35
|
-
- **Real-time Preview**: Instantly display file contents with syntax highlighting (via `bat`)
|
|
36
|
-
- **Fast Search**: Integration with fzf/rga
|
|
35
|
+
- **Real-time Preview**: Instantly display file contents with syntax highlighting (via `bat`), including `.zip` entry lists
|
|
36
|
+
- **Fast Search**: Integration with fzf/rga, plus built-in search across all bookmarks that also reads PDF, Excel and PowerPoint
|
|
37
|
+
- **ZIP Archives**: Extract or compress selected items as a background job
|
|
38
|
+
- **Jump to a Path**: Paste any path into `:cd`
|
|
37
39
|
- **Bookmarks**: Quick access to frequently used directories
|
|
38
40
|
- **zoxide Integration**: Smart directory history
|
|
39
41
|
|
|
@@ -78,311 +80,38 @@ rufio /path/to # Launch in specified directory
|
|
|
78
80
|
|
|
79
81
|
## Key Bindings
|
|
80
82
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
| Key |
|
|
84
|
-
|
|
85
|
-
| `j/k` | Move
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
|
94
|
-
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
| `a/A` | Create file/directory |
|
|
98
|
-
| `r` | Rename |
|
|
99
|
-
| `d` | Delete |
|
|
100
|
-
| `m/c/x` | Move/copy/delete (selected) |
|
|
101
|
-
|
|
102
|
-
### Search & Filter
|
|
103
|
-
|
|
104
|
-
| Key | Function |
|
|
105
|
-
|-----|----------|
|
|
106
|
-
| `f` | Filter mode |
|
|
107
|
-
| `s` | Search files with fzf |
|
|
108
|
-
| `F` | Search file contents with rga |
|
|
109
|
-
|
|
110
|
-
### Navigation
|
|
111
|
-
|
|
112
|
-
| Key | Function |
|
|
113
|
-
|-----|----------|
|
|
114
|
-
| `b` | Add bookmark |
|
|
115
|
-
| `B` | Bookmark menu |
|
|
116
|
-
| `0` | Return to startup directory |
|
|
117
|
-
| `1-9` | Jump to bookmark |
|
|
118
|
-
| `Tab` | Cycle to next bookmark (Files mode only) |
|
|
119
|
-
| `z` | zoxide history |
|
|
120
|
-
|
|
121
|
-
### Tool Runtime
|
|
122
|
-
|
|
123
|
-
| Key | Function |
|
|
124
|
-
|-----|----------|
|
|
125
|
-
| `:` | Command mode |
|
|
126
|
-
| `G` | Search file names or contents across all bookmarked directories |
|
|
127
|
-
| `C` | Open ~/.config/rufio/ in Config mode (same controls as Files) |
|
|
128
|
-
| `J` | Job mode |
|
|
129
|
-
| `L` | View execution logs |
|
|
83
|
+
The most used keys. See the **[User Guide](./docs/guide.md)** for every key and mode, or press `?` inside rufio.
|
|
84
|
+
|
|
85
|
+
| Key | Action |
|
|
86
|
+
|-----|--------|
|
|
87
|
+
| `j/k`, `h/l` | Move / parent directory / enter directory |
|
|
88
|
+
| `g/}` | First / last entry |
|
|
89
|
+
| `P` | Fullscreen preview |
|
|
90
|
+
| `Space` | Select |
|
|
91
|
+
| `m/c/x` | Move / copy / delete selected items |
|
|
92
|
+
| `z` | Extract or compress selected items (`.zip`); zoxide history when nothing is selected |
|
|
93
|
+
| `a/A`, `r`, `d` | Create file / directory, rename, delete |
|
|
94
|
+
| `f`, `s`, `F` | Filter, fzf file name search, rga content search |
|
|
95
|
+
| `G` | Search names or contents (PDF, Excel, PowerPoint too) across all bookmarks |
|
|
96
|
+
| `b`, `B`, `1-9`, `Tab` | Add bookmark, bookmark menu, jump, next bookmark |
|
|
97
|
+
| `:` | Command mode (`@script`, `rake:task`, `!shell`, `cd <path>`) |
|
|
98
|
+
| `J`, `L`, `C` | Jobs, logs, config directory |
|
|
130
99
|
| `?` | Help |
|
|
131
|
-
| `
|
|
100
|
+
| `q`, `T` | Quit, quit and cd the shell to the current directory |
|
|
132
101
|
|
|
133
|
-
|
|
102
|
+
In G mode, use `Ctrl+J` / `Ctrl+K` to select the next / previous result and `Enter` to open it.
|
|
134
103
|
|
|
135
|
-
|
|
136
|
-
switches between **File names** and **Content**. Type a literal string to
|
|
137
|
-
search (case insensitive); content results include the file, line number,
|
|
138
|
-
and matching text. Text is read as UTF-8; files containing NUL bytes in the
|
|
139
|
-
first 8 KB are skipped as binary. Use Up/Down or Ctrl+N/P to select a
|
|
140
|
-
result, and press Enter to jump to that file in Files mode. `Ctrl+U` clears
|
|
141
|
-
the query; `Esc` cancels and returns to your previous view. Scanning runs in
|
|
142
|
-
the background and skips inaccessible directories and directory symlinks.
|
|
143
|
-
Add bookmarks with `b` before searching. G mode needs no external search tools.
|
|
144
|
-
While scanning, a yellow `Searching...` indicator animates even before matches
|
|
145
|
-
arrive. It turns green and displays `Search complete` when the scan finishes.
|
|
104
|
+
## Documentation
|
|
146
105
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
```ruby
|
|
151
|
-
GLOBAL_SEARCH_EXCLUDED_EXTENSIONS = %w[.png .jpg .zip .tar.gz .log].freeze
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
Extensions are case insensitive and the leading dot is optional. The default
|
|
155
|
-
is `[]` (no extension exclusions). Directory names are unaffected.
|
|
156
|
-
|
|
157
|
-
### Config Mode (C)
|
|
158
|
-
|
|
159
|
-
Press `C` to open `~/.config/rufio/`, creating it if needed. Navigation, previews,
|
|
160
|
-
and file operations work as in Files mode. Browse settings and scripts directly;
|
|
161
|
-
leaving the config directory returns the mode display to Files.
|
|
162
|
-
|
|
163
|
-
## Command Mode
|
|
164
|
-
|
|
165
|
-
Press `:` to enter command mode and execute various commands.
|
|
166
|
-
|
|
167
|
-
### Script Execution
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
:@build # @ prefix triggers script completion
|
|
171
|
-
:@deploy.rb # Execute registered script
|
|
172
|
-
:@local.sh # Scripts in current directory are also available
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### Rake Task Execution
|
|
176
|
-
|
|
177
|
-
```
|
|
178
|
-
:rake:test # Execute rake task
|
|
179
|
-
:rake:build # Tab completion supported
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Rakefile in the current directory is automatically parsed. Supports `Rakefile`, `rakefile`, `Rakefile.rb`.
|
|
183
|
-
|
|
184
|
-
### Shell Commands
|
|
185
|
-
|
|
186
|
-
```
|
|
187
|
-
:!git status # ! prefix for shell commands
|
|
188
|
-
:!ls -la # Execute in background
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Built-in Commands
|
|
192
|
-
|
|
193
|
-
```
|
|
194
|
-
:hello # Greeting message
|
|
195
|
-
:stop # Quit rufio
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
## Script Path
|
|
199
|
-
|
|
200
|
-
### What is Script Path?
|
|
201
|
-
|
|
202
|
-
A feature to register directories containing script files. Scripts in registered directories can be executed using the `@` prefix in command mode.
|
|
203
|
-
|
|
204
|
-
### Management
|
|
205
|
-
|
|
206
|
-
Press `B` → `3` to open the script path management menu:
|
|
207
|
-
|
|
208
|
-
- View registered paths
|
|
209
|
-
- `d`: Remove path
|
|
210
|
-
- `Enter`: Jump to directory
|
|
211
|
-
- `ESC`: Close menu
|
|
212
|
-
|
|
213
|
-
### Supported Scripts
|
|
214
|
-
|
|
215
|
-
| Extension | Language |
|
|
216
|
-
|-----------|----------|
|
|
217
|
-
| `.rb` | Ruby |
|
|
218
|
-
| `.py` | Python |
|
|
219
|
-
| `.sh` | Shell (bash/zsh) |
|
|
220
|
-
| `.js` | JavaScript (Node.js) |
|
|
221
|
-
| `.ts` | TypeScript (ts-node/deno) |
|
|
222
|
-
| `.pl` | Perl |
|
|
223
|
-
| `.ps1` | PowerShell |
|
|
224
|
-
|
|
225
|
-
## DSL Commands
|
|
226
|
-
|
|
227
|
-
Define custom commands in `~/.config/rufio/commands.rb`:
|
|
228
|
-
|
|
229
|
-
```ruby
|
|
230
|
-
command "hello" do
|
|
231
|
-
ruby { "Hello from rufio!" }
|
|
232
|
-
description "Greeting command"
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
command "status" do
|
|
236
|
-
shell "git status"
|
|
237
|
-
description "Git status"
|
|
238
|
-
end
|
|
239
|
-
|
|
240
|
-
command "build" do
|
|
241
|
-
script "~/.config/rufio/scripts/build.rb"
|
|
242
|
-
description "Run build"
|
|
243
|
-
end
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
## Configuration
|
|
247
|
-
|
|
248
|
-
### Configuration File Structure
|
|
249
|
-
|
|
250
|
-
```
|
|
251
|
-
~/.config/rufio/
|
|
252
|
-
├── config.rb # DSL-style main configuration
|
|
253
|
-
├── script_paths.yml # Script directories (list format)
|
|
254
|
-
├── bookmarks.yml # Bookmarks (list format)
|
|
255
|
-
├── commands.rb # DSL command definitions
|
|
256
|
-
├── scripts/ # Script files
|
|
257
|
-
└── logs/ # Execution logs
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### config.rb (DSL Configuration)
|
|
261
|
-
|
|
262
|
-
```ruby
|
|
263
|
-
# ~/.config/rufio/config.rb
|
|
264
|
-
|
|
265
|
-
# Language setting: 'en' or 'ja'
|
|
266
|
-
LANGUAGE = 'ja'
|
|
267
|
-
|
|
268
|
-
# Color settings (HSL format)
|
|
269
|
-
COLORS = {
|
|
270
|
-
directory: { hsl: [220, 80, 60] },
|
|
271
|
-
file: { hsl: [0, 0, 90] },
|
|
272
|
-
executable: { hsl: [120, 70, 50] },
|
|
273
|
-
selected: { hsl: [50, 90, 70] },
|
|
274
|
-
preview: { hsl: [180, 60, 65] }
|
|
275
|
-
}.freeze
|
|
276
|
-
|
|
277
|
-
# Keybind settings
|
|
278
|
-
KEYBINDS = {
|
|
279
|
-
quit: %w[q ESC],
|
|
280
|
-
up: %w[k UP],
|
|
281
|
-
down: %w[j DOWN]
|
|
282
|
-
}.freeze
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
### script_paths.yml
|
|
286
|
-
|
|
287
|
-
```yaml
|
|
288
|
-
# ~/.config/rufio/script_paths.yml
|
|
289
|
-
- ~/.config/rufio/scripts
|
|
290
|
-
- ~/bin
|
|
291
|
-
- ~/scripts
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
### bookmarks.yml
|
|
295
|
-
|
|
296
|
-
```yaml
|
|
297
|
-
# ~/.config/rufio/bookmarks.yml
|
|
298
|
-
- path: ~/Documents
|
|
299
|
-
name: Documents
|
|
300
|
-
- path: ~/projects
|
|
301
|
-
name: Projects
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### Local Configuration
|
|
305
|
-
|
|
306
|
-
Place `rufio.yml` in your project root for project-specific script paths:
|
|
307
|
-
|
|
308
|
-
```yaml
|
|
309
|
-
# ./rufio.yml (project root)
|
|
310
|
-
script_paths:
|
|
311
|
-
- ./scripts
|
|
312
|
-
- ./bin
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
## External Tool Integration
|
|
316
|
-
|
|
317
|
-
rufio integrates with the following external tools to extend functionality.
|
|
318
|
-
All tools are **optional** — rufio works without them, falling back to built-in behavior.
|
|
319
|
-
|
|
320
|
-
| Tool | Purpose | Key | Required? |
|
|
321
|
-
|------|---------|-----|-----------|
|
|
322
|
-
| fzf | File name search | `s` | Optional |
|
|
323
|
-
| rga | File content search | `F` | Optional |
|
|
324
|
-
| zoxide | Directory history | `z` | Optional |
|
|
325
|
-
| bat | Syntax highlighting in preview | — | Optional |
|
|
326
|
-
|
|
327
|
-
### bat — Syntax Highlighting
|
|
328
|
-
|
|
329
|
-
When `bat` is installed, code files in the preview pane are displayed with full syntax
|
|
330
|
-
highlighting (Ruby, Python, Go, Rust, TypeScript, and 15+ more languages).
|
|
331
|
-
|
|
332
|
-
Highlighting is loaded asynchronously — navigation stays fast even on large source trees.
|
|
333
|
-
|
|
334
|
-
```bash
|
|
335
|
-
# macOS
|
|
336
|
-
brew install bat
|
|
337
|
-
|
|
338
|
-
# Ubuntu/Debian
|
|
339
|
-
apt install bat
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
Run `rufio -c` to verify bat is detected correctly.
|
|
343
|
-
|
|
344
|
-
### Installation (all tools)
|
|
345
|
-
|
|
346
|
-
```bash
|
|
347
|
-
# macOS
|
|
348
|
-
brew install fzf bat rga zoxide
|
|
349
|
-
|
|
350
|
-
# Ubuntu/Debian
|
|
351
|
-
apt install fzf bat zoxide
|
|
352
|
-
# rga requires separate installation: https://github.com/phiresky/ripgrep-all
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
## Advanced Features
|
|
356
|
-
|
|
357
|
-
### Native Scanner (Experimental)
|
|
358
|
-
|
|
359
|
-
Support for native implementation for fast directory scanning:
|
|
360
|
-
|
|
361
|
-
```bash
|
|
362
|
-
rufio --native # Auto-detect
|
|
363
|
-
rufio --native=zig # Zig implementation
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
### JIT Compiler
|
|
367
|
-
|
|
368
|
-
```bash
|
|
369
|
-
rufio --yjit # Ruby 3.1+ YJIT
|
|
370
|
-
rufio --zjit # Ruby 3.4+ ZJIT
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
### Health Check
|
|
374
|
-
|
|
375
|
-
```bash
|
|
376
|
-
rufio -c # Check system dependencies
|
|
377
|
-
rufio --check-health # Same as above
|
|
378
|
-
```
|
|
106
|
+
- **[User Guide](./docs/guide.md)**: keys, modes, command mode, scripts, DSL commands, configuration, shell integration and the native engine
|
|
107
|
+
- **[CHANGELOG](./CHANGELOG.md)**: release notes
|
|
108
|
+
- **[SECURITY.md](./SECURITY.md)**: security design
|
|
379
109
|
|
|
380
110
|
## Development
|
|
381
111
|
|
|
382
112
|
### Requirements
|
|
383
113
|
|
|
384
114
|
- Ruby 2.7.0 or later
|
|
385
|
-
- io-console, pastel, tty-cursor, tty-screen gems
|
|
386
115
|
|
|
387
116
|
### Running Development Version
|
|
388
117
|
|