Initial commit.
This commit is contained in:
commit
807ce8cad6
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
main_*
|
||||
|
27
Makefile
Normal file
27
Makefile
Normal file
@ -0,0 +1,27 @@
|
||||
# Compiler
|
||||
CC = gcc
|
||||
|
||||
# Compiler flags
|
||||
CFLAGS = -Wall -Wextra -pedantic -L/usr/local/lib -lncurses -lncursesw -ltinfo -ldl -lpthread -static
|
||||
|
||||
# Executable name
|
||||
TARGET = rzf
|
||||
|
||||
# Source files
|
||||
SRCS = main.c
|
||||
|
||||
# Object files
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
# Default target
|
||||
all: $(TARGET)
|
||||
|
||||
# Build the executable
|
||||
$(TARGET): $(OBJS)
|
||||
$(CC) -o $@ $^ $(CFLAGS)
|
||||
|
||||
# Clean up build files
|
||||
clean:
|
||||
rm -f $(TARGET) $(OBJS)
|
||||
|
||||
.PHONY: all clean
|
125
README.md
Normal file
125
README.md
Normal file
@ -0,0 +1,125 @@
|
||||
# RZF - The Ultimate Terminal File Explorer and Search Tool
|
||||
|
||||
Welcome to **RZF**, the most powerful, fast, and versatile terminal-based file explorer and search utility designed for every terminal warrior. Built with performance in mind, leveraging C's maximum efficiency, RZF is your go-to tool for managing and navigating millions of files seamlessly.
|
||||
|
||||
Development is mostly done manually, but later completed and refactored with several LLM's (Gemini Pro, ChatGPT Plus and Claude Pro).
|
||||
|
||||
---
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Lightning-fast file indexing** capable of handling millions of files without breaking a sweat.
|
||||
- **Smart directory skipping**: Automatically skips directories like `venv`, `node_modules`, and other common variants to speed up searches.
|
||||
- **Powerful search modes**:
|
||||
- Fuzzy search for quick, approximate matching.
|
||||
- Regex search for precise pattern matching.
|
||||
- **File filtering**:
|
||||
- Filter by extension (e.g., `:py`, `:img`, `:doc`).
|
||||
- Show only bookmarked files or all files.
|
||||
- **Favorites and Bookmarks**:
|
||||
- Easily add or remove bookmarks.
|
||||
- Quick access to favorite files.
|
||||
- **Preview Mode**:
|
||||
- Toggle preview panel to view file contents or directory listings without leaving the interface.
|
||||
- Supports binary and text files, directories, and images.
|
||||
- **Clipboard Integration**:
|
||||
- Copy file paths with `Ctrl+X`.
|
||||
- Copy file contents directly to clipboard with `Ctrl+Y` — perfect for sharing snippets or feeding into an LLM.
|
||||
- **Backup Files**:
|
||||
- Quick backups with `Ctrl+B`, appending timestamps for safety. Extension ends with .bak which you can list in your .gitignore.
|
||||
- **File Operations**:
|
||||
- Delete files or directories with confirmation.
|
||||
- Recursive delete for directories.
|
||||
- Open files or directories with `xdg-open`.
|
||||
- **Navigation**:
|
||||
- Go to parent directory (`Ctrl+U`).
|
||||
- Change sort modes (`Ctrl+V`). (V is Dutch for volgorde)
|
||||
- Toggle between sorting by name, size, or date.
|
||||
- **Search History & Command Prompt**:
|
||||
- Recall previous searches.
|
||||
- Run custom commands on selected files.
|
||||
- **User-friendly shortcuts**:
|
||||
- Help menu with all shortcuts.
|
||||
- Toggle bookmarks, search modes, and preview with simple keystrokes.
|
||||
- **Static Compilation**:
|
||||
- Fully static binary for maximum portability.
|
||||
- Designed to work out-of-the-box on most Linux systems.
|
||||
- **Lightweight & Efficient**:
|
||||
- Minimal dependencies.
|
||||
- Designed for maximum performance and safety.
|
||||
|
||||
---
|
||||
|
||||
## Shortcuts & Usage
|
||||
|
||||
| Shortcut | Description |
|
||||
| --- | --- |
|
||||
| **Arrow Up / Arrow Down** | Navigate through files and directories |
|
||||
| **Enter** | Open file or directory |
|
||||
| **Ctrl+X** | Copy selected file path to clipboard |
|
||||
| **Ctrl+Y** | Copy file contents to clipboard (great for sharing snippets or LLM input) |
|
||||
| **Ctrl+B** | Backup selected file with timestamp (safe and quick) |
|
||||
| **Ctrl+D** | Delete selected file or directory (with confirmation) |
|
||||
| **Ctrl+U** | Go to parent directory |
|
||||
| **Ctrl+V** | Toggle sort mode (Name, Size, Date) |
|
||||
| **Ctrl+P** | Toggle preview mode to view file contents or directory listing |
|
||||
| **Ctrl+S** | Toggle bookmark for selected file |
|
||||
| **Ctrl+F** | Show only bookmarked files |
|
||||
| **Ctrl+R** | Search history navigation |
|
||||
| **Ctrl+E** | Toggle regex search mode |
|
||||
| **?** | Show help menu with all shortcuts |
|
||||
| **Ctrl+C / Esc** | Exit the application |
|
||||
|
||||
---
|
||||
|
||||
## Tips & Recommendations
|
||||
|
||||
- **Installation**:
|
||||
- Copy the binary to `/usr/local/bin` for easy global access:
|
||||
```bash
|
||||
sudo cp rzf /usr/local/bin/
|
||||
```
|
||||
- Add a bash shortcut for quick launching:
|
||||
```bash
|
||||
bind -x '"\C-f": rzf'
|
||||
```
|
||||
- **Performance & Compatibility**:
|
||||
- The binary is statically compiled, ensuring maximum compatibility and performance.
|
||||
- It should work on most Linux distributions out-of-the-box.
|
||||
- If you encounter issues or want to compile manually:
|
||||
- Remove the `-static` parameter in the Makefile.
|
||||
- Ensure `ncurses-dev` is installed (`sudo apt install libncurses-dev`).
|
||||
- **Development Setup**:
|
||||
- Setting up the environment is a breeze and can be done within 5 minutes.
|
||||
- The code is manually written to optimize performance and usability.
|
||||
- **Use Cases**:
|
||||
- Perfect for developers, sysadmins, and terminal enthusiasts.
|
||||
- Ideal for managing large codebases, quick file access, and integrating with LLMs.
|
||||
- The copy-to-clipboard feature (`Ctrl+Y`) makes it easy to extract snippets or file contents for sharing or AI processing.
|
||||
- Backup files instantly with `Ctrl+B` — a lifesaver when experimenting or editing.
|
||||
|
||||
---
|
||||
|
||||
## Why RZF?
|
||||
|
||||
- **Performance**: Fully utilizes C's speed to handle millions of files effortlessly.
|
||||
- **Safety**: Recursive delete with confirmation, safe backups, and manual code ensure reliability.
|
||||
- **Convenience**: All essential features are accessible via intuitive shortcuts.
|
||||
- **Portability**: Static binary means no dependencies or complex setup.
|
||||
- **Manual Craftsmanship**: A lot of the code is handcrafted to deliver a polished, efficient experience. Unlike this README.md :P
|
||||
|
||||
---
|
||||
|
||||
## Final Notes
|
||||
|
||||
This project is the culmination of meticulous manual coding, optimized for speed, safety, and user experience. It’s a big time-saver and a powerful addition to any terminal user’s toolkit. Whether you're navigating vast codebases or managing files on a server, **RZF** is your ultimate terminal companion.
|
||||
|
||||
---
|
||||
|
||||
## Support & Feedback
|
||||
|
||||
While I believe the application is now feature-complete and polished, I am always available for support and feedback. Feel free to reach out for assistance or suggestions.
|
||||
|
||||
---
|
||||
|
||||
Enjoy your terminal mastery with **RZF** — the ultimate tool for every terminal warrior!
|
Loading…
Reference in New Issue
Block a user