/proximity-sort

Zig implementation of @jonhoo's proximity-sort.

Primary LanguageZigApache License 2.0Apache-2.0

proximity-sort

Zig implementation of @jonhoo's proximity-sort.

Why?

I just started learning Zig. And, proximity-sort felt like a good first project.

Overview

The command-line utility sorts the inputs (from stdin) by their path proximity (number of shared leading path components) to a given path.

Example Usage

fd -t f | zig-out/bin/proximity-sort /path/to/file | fzf --reverse --tiebreak=index

Building from Source

If you have zig master installed, you can build this with -

zig build -Doptimize=ReleaseSafe

Credits & References