Tool to copy things!

Overview

zp

zp is a cli command to copy the contents of the source file or of the std output buffer to the clipboard. To use the zp, simply open your terminal or command prompt (well install it first) and type zp followed by the name of the source file. For example:

zp my_file.txt

To get the first n words of the file :

zp -s n my_file.txt 

To get the lines between a range, i.e., to get lines from n till m of the file:

zp -s n -e m my_file.txt 

Also you can use zp to copy from the std output buffer :

cat sample_file.txt | zp 

This copies the entire output of the file.

You can use get a range of lines and the first n words also from the std output buffer :

cat sample_file.txt | zp -s 2

cat sample_file.txt | zp -s 2 -e 5

This gets the first 2 words and lines from 2 to 5 of the sample_file.txt respectively

This will copy the contents of "myFile.txt" to the clipboard.

The "zp" command is particularly useful for quickly copying text or data from one file to another without having to manually select and copy the text. This can save time and effort, especially when working with large or complex files.

Install

It's best to use rustup to get setup with a Rust toolchain, then you can run:

cargo install zp

Homebrew

brew tap bahdotsh/zp
brew install zp

From source

git clone https://github.com/bahdotsh/zp.git
cd zp
cargo install --path .
You might also like...
A CLI utility to secretly copy secrets to your clipboard. 🦀
A CLI utility to secretly copy secrets to your clipboard. 🦀

seclip 🔒 📝 A CLI utility to secretly copy secrets to your clipboard. 🦀 Table of Contents Features Installation Usage Build From Source Contribution

Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.
Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.

paleatra v.0.0.1 Command-Line program that takes an image and produces the copy of the image with a thin frame and palette made of the 10 most frequen

A trash-cli copy, but this time in Rust.

trash-rs A trash-cli copy, but this time in Rust. TODO Deletion Relative paths * functionality List files Include in Metadata: Original directory Date

Send copy events over the network

Copiepate Copiepate is a small utility to remotely set the content of a clipboard. I created this tool as I frequently use a remote tmux+vim setup and

Just a UNIX's cat copy, but less bloated and in Rust.
Just a UNIX's cat copy, but less bloated and in Rust.

RAT The opposite of UNIX's cat, less bloated, and in Rust. About the project The idea of this CLI is "A CLI program that is basically UNIX's cat comma

stat-rs is a copy of linux command stat

stat-rs is a copy of linux command stat

Copy files from Git repository to local.

gitcp Copy files from Git repository to local. Install We are planning to add some installers support in the future. e.g. homebrew winget debian packa

Pure rust library for reading / writing DNG files providing access to the raw data in a zero-copy friendly way.

DNG-rs   A pure rust library for reading / writing DNG files providing access to the raw data in a zero-copy friendly way. Also containing code for re

Just in time Oxidation. A little experimentation with inkwell and copy-and-patch compilation

Experimental Copy-and-Patch compiler backend written in Rust This is supposed to become an experimental compiler backend based on Copy and Patch to be

Comments
  • Move to clap for argument parsing #suggestions from reddit

    Move to clap for argument parsing #suggestions from reddit

    It seems like zp is including clap as a dependency but then parses the command line options by manually iterating through std::env::args. Can save a lot of code by using clap as an argument parser and relying on standard conventions for options. Take a look at cut to get an idea of how to select a start and end.

    opened by bahdotsh 0
  • Copy specified number of lines from a file.

    Copy specified number of lines from a file.

    • zp file.txt 5 should be able to copy the first 5 lines from the file.
    • And also from a range, as in, zp file.txt 8 12 copies the 8th line to the 12th line from the file
    enhancement 
    opened by bahdotsh 0
Releases(v1.0.0)
Owner
Gokul
Gokul
Rust library for putting things in a grid

rust-term-grid This library arranges textual data in a grid format suitable for fixed-width fonts, using an algorithm to minimise the amount of space

Benjamin Sago 61 Nov 4, 2022
Scouty is a command-line interface (CLI) to keep an eye on substrate-based chains and hook things up

scouty is a command-line interface (CLI) to keep an eye on substrate-based chains and hook things up

TurboFlakes 15 Aug 6, 2022
Brutally simple command line app for jotting things down

jot Brutally simple command line app for jotting things down. About jot lets you get things down before you forget, without fiddling folders, naming,

Alexander Alexandrov 1 Apr 8, 2022
Giddy up! Things are going to be wild.

Jocky - For controlling your horses Current Idea The idea is essentially to have a custom directory that writes immutable segments, this means only 2

Harrison Burt 3 Jan 7, 2023
Work out how far apart things should be (very quickly)

Kern determiner Work out how far apart things should be (very quickly) kerndeterminer is a Rust-based library for determining a kern value between two

Simon Cozens 10 Oct 29, 2022
ratlab is a programming platform designed loosely for hobbyist and masochist to analyse and design stuff and things that transform our world?

ratlab A programming language developed by Quinn Horton and Jay Hunter. ratlab is a programming platform designed loosely for hobbyists and masochists

Jay 10 Sep 4, 2023
A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.

Visual Assembly Canvas A highly visual assembly editor, infinite canvas for wiring blocks and machines together, bytecode virtual machine runnable nat

Phoomparin Mano 31 Oct 11, 2023
An Azalea plugin with things that will probably trigger anticheats.

Azalea Hax An Azalea plugin with useful features that will probably trigger anticheats. Usage async fn handle(mut bot: Client, event: azalea::Event, s

null 4 Oct 17, 2023
A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.

Visual Assembly Canvas A highly visual assembly editor, infinite canvas for wiring blocks and machines together, bytecode virtual machine runnable nat

Phoomparin Mano 32 Oct 11, 2023
A CLI tool to copy-paste different Ipsums from your terminal

Lorem clipsum Explore the docs » View Demo · Report Bug · Request Feature Table of Contents About The Project Built With Usage Contributing Contact Ab

Schrödinger Hat 9 May 30, 2023