Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krish-r/proximity-sort
Zig implementation of @jonhoo's proximity-sort.
https://github.com/krish-r/proximity-sort
zig
Last synced: 3 days ago
JSON representation
Zig implementation of @jonhoo's proximity-sort.
- Host: GitHub
- URL: https://github.com/krish-r/proximity-sort
- Owner: krish-r
- License: apache-2.0
- Created: 2024-09-17T19:27:10.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-20T16:42:00.000Z (4 months ago)
- Last Synced: 2024-11-21T08:53:45.736Z (about 2 months ago)
- Topics: zig
- Language: Zig
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# proximity-sort
Zig implementation of [@jonhoo][jon-gjengset]'s [proximity-sort][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
```shell
fd -t f | zig-out/bin/proximity-sort /path/to/file | fzf --reverse --tiebreak=index
```## Building from Source
If you have [zig master](https://ziglang.org/download/) installed, you can build this with -
```shell
zig build -Doptimize=ReleaseSafe
```## Credits & References
- [proximity-sort][proximity-sort] by [@jonhoo][jon-gjengset]
- [Performance Optimizer Observation Platform][performance-optimizer-observation-platform] by [@andrewrk][andrew-kelley].[jon-gjengset]: https://github.com/jonhoo/
[andrew-kelley]: https://github.com/andrewrk/
[proximity-sort]: https://github.com/jonhoo/proximity-sort/
[performance-optimizer-observation-platform]: https://github.com/andrewrk/poop/