# interactive
**Repository Path**: lidh04/interactive
## Basic Information
- **Project Name**: interactive
- **Description**: shell interactive script tool
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-08-02
- **Last Updated**: 2026-08-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# fsv
`fsv` is an interactive terminal file and content search tool. It uses [`fzf`](https://github.com/junegunn/fzf) to select results and opens the selected file in Vim.
From a single menu, you can:
- Search for files by name with `fd`.
- Search file contents with `rg` (or `ag` as a fallback).
- Preview files and content matches before opening them.
- Open a content match in Vim at its exact line and column.
Searches run recursively from the current working directory and follow the underlying search tools' default ignore rules.
## Requirements
- Bash
- [`fd`](https://github.com/sharkdp/fd)
- [`fzf`](https://github.com/junegunn/fzf)
- Vim
- One content search tool:
- [`ripgrep` (`rg`)](https://github.com/BurntSushi/ripgrep), preferred when available; or
- [`The Silver Searcher` (`ag`)](https://github.com/ggreer/the_silver_searcher)
`fsv` checks for these commands at startup and reports any missing dependency.
## Installation
Run the included installer:
```sh
./install.sh
```
This copies `fsv` to `~/bin/fsv` and makes it executable. If `~/bin` is not already in your `PATH`, add it in your shell configuration. For example:
```sh
export PATH="$HOME/bin:$PATH"
```
Alternatively, copy the `fsv` script to any directory already in your `PATH` and ensure it is executable.
## Usage
Change to the directory you want to search, then run:
```sh
fsv
```
The main menu provides three actions. Both search actions ask for an optional file-type filter. Enter extensions separated by commas or spaces; leading dots and `*.` are optional:
```text
.json, .js, .ts, .py
```
This example limits the search to JSON, JavaScript, TypeScript, and Python files. Press Enter without entering any file types to search all files.
### Search files
Select **Search files**, enter the file types to include (or leave the filter empty), then type in `fzf` to narrow the recursively discovered files. Press Enter to open the selected file in Vim. The preview pane displays the beginning of the highlighted file.
### Search contents
Select **Search contents**, enter a regular-expression query, and then enter the file types to include (or leave the filter empty). Results include the matching path, line, column, and text. Filter the results with `fzf`, then press Enter to open the selected file in Vim with the cursor at the match.
An empty content query returns to the main menu.
### Exit and navigation
- Press Esc in a search screen to return to the main menu.
- Press Esc in the main menu, or select **Exit**, to quit.
- After Vim closes, `fsv` returns to its main menu.
## Help
```sh
fsv --help
# or
fsv -h
```