https://github.com/staab/cateract
An interactive command-line application for viewing files.
https://github.com/staab/cateract
Last synced: 12 months ago
JSON representation
An interactive command-line application for viewing files.
- Host: GitHub
- URL: https://github.com/staab/cateract
- Owner: staab
- License: mit
- Created: 2021-05-10T14:59:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-10T15:47:58.000Z (about 5 years ago)
- Last Synced: 2025-05-21T02:46:27.993Z (about 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a script for viewing files interactively. Inspired by [fzf](https://github.com/junegunn/fzf), which is an interactive cli file-picker.
[](https://asciinema.org/a/413162)
# Usage
```
usage: cateract [-h] filename
An interactive cli file viewer
positional arguments:
filename The name of the file to view
optional arguments:
-h, --help show this help message and exit
```
Once in the interactive prompt, cateract pipes the contents of the file to an executable of your choice. Further redirection is not supported, as all arguments are shell-quoted. This allows something like `jq .|length` to work as expected without having to quote the argument manually.
# Installation
Make sure `python3` is a valid command on your system, then install:
```
mkdir -p ~/.local/bin
curl https://raw.githubusercontent.com/staab/cateract/master/cateract > ~/.local/bin/cateract
chmod +x ~/.local/bin/cateract
```
Then, make sure ~/.local/bin is in your path.