https://github.com/koalagang/zsh-pipr
Interactively write zsh pipelines
https://github.com/koalagang/zsh-pipr
command-line pipr script shell zsh zsh-plugin
Last synced: 5 months ago
JSON representation
Interactively write zsh pipelines
- Host: GitHub
- URL: https://github.com/koalagang/zsh-pipr
- Owner: koalagang
- License: mit
- Created: 2024-09-09T12:19:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-09T13:05:31.000Z (almost 2 years ago)
- Last Synced: 2025-03-16T14:37:43.451Z (over 1 year ago)
- Topics: command-line, pipr, script, shell, zsh, zsh-plugin
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zsh-pipr
Zsh-pipr is a tiny plugin that integrates [pipr](https://github.com/elkowar/pipr) with zsh.
Whilst there is a zsh script provided directly within the pipr repo,
this breaks syntax highlighting and, moreover, is not easy to install with plugin managers.
## Installation
First install `pipr`, as this is a dependency, then install zsh-pipr through a method of your choosing.
### Manual
Clone `https://github.com/koalagang/zsh-pipr.git` into a location of your choosing
and then `source /path/to/pipr.plugin.zsh` from your zshrc.
### Plugin manager
You should be able to use any zsh plugin manager. Feel free to open an issue about it if this doesn't work out with your
favourite plugin manager.
### Nix (home-manager)
You can use the zsh home-manager module with the `fetchFromGithub` fetcher to install zsh-pipr.
For example:
```nix
# include pkgs
{ pkgs, ... }:
{
# make sure to install pipr
home.packages = [ pkgs.pipr ];
programs.zsh = {
enable = true;
plugins = [
{
name = "zsh-pipr";
file = "pipr.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "koalagang";
repo = "zsh-pipr";
rev = "62e4a240d4354ed90071d7007896efc15a2381db";
hash = "sha256-zxu/uk/iL5jPHilnvhB647+2f4kC8KpAKDbvJPimy/0=";
};
}
];
};
}
```
## Usage
Simply hit ctrl+p to open pipr with the current contents of the commandline. When you wish to leave pipr, hit ctrl+c and
you'll be returned to the commandline with any extra content you added whilst using pipr.
## Tips
- You may want to add `eval_environment = ["zsh", "-c"]` to `~/.config/pipr/pipr.toml` because pipr uses bash by default
- Avoid using interactive tools like fzf with pipr as this can lead to issues
- Pipr has a bunch of [cool features](https://github.com/elkowar/pipr?tab=readme-ov-file#usage) so consider checking those out