Tree


.build.ymlcommits | blame
.gitignorecommits | blame
LICENSEcommits | blame
README.mdcommits | blame
build.zigcommits | blame
build.zig.zoncommits | blame
config.jsoncommits | blame
hack/
justfilecommits | blame
magdalena.1.scdcommits | blame
prek.tomlcommits | blame
src/
themes/

README.md

# magdalena
[![builds.sr.ht status](https://builds.sr.ht/~mtmn/magdalena.svg)](https://builds.sr.ht/~mtmn/magdalena?)

A command-line tool for interactive shell navigation and history.

## Features

- Interactive shell navigation
- Fuzzy finding integration
- Memcached integration
- Grep integration

## Dependencies

- Zig 0.16.0
- ugrep
- memcached (optional)

## Building

To build the project, run:

```sh
zig build -Doptimize=ReleaseSafe
```

## Usage

```
magdalena recent-directories
magdalena recent-files
magdalena favorites
magdalena goto-directory
magdalena goto-file
magdalena log-directory <path>
magdalena log-file <path> [type] [action]
magdalena search <query>
magdalena look-file [--depth <n>]
magdalena look-directory [--depth <n>]
magdalena grep [query]
magdalena git-status
magdalena select
```

### Options

- `-c`, `--clean`: Perform cleanup
- `-h`, `--help`: Show this help

### Example

```sh
# Run magdalena
./zig-out/bin/magdalena

# Show recent directories
./zig-out/bin/magdalena recent-directories

# Search history
./zig-out/bin/magdalena search "myquery"

# Explore directory with depth 3
./zig-out/bin/magdalena look-directory --depth 3

# Pick a changed file from git status
./zig-out/bin/magdalena git-status

# Grep with a starting query prefilled
./zig-out/bin/magdalena grep "todo"

# Fuzzy pick from any piped list
git ls-files | ./zig-out/bin/magdalena select

# Embed the picker in an editor: write the pick to a file, do not open
./zig-out/bin/magdalena --choose-file /tmp/pick look-file
```

With `--choose-file`, any picker command writes the selection to the given
file and exits instead of opening an editor. File pickers write the path and
grep writes `file:line`. History logging is skipped because the embedding
editor owns the open event.