jabbalaci / jabba-cpc

Copies the path of the current working dir. to the clipboard. If a parameter is given, it's also added to the path.

Home Page:https://crates.io/crates/jabba-cpc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jabba-cpc

The name "cpc" stands for copy path to clipboard. This is a binary crate.

cpc copies the path of the current working directory to the clipboard. If a parameter is given, it's also added to the path.

Supported platforms: Windows and Linux (with X server).

Demo

view demo on YouTube

Windows

Put cpc.exe to a folder that is in your PATH.

Example:

c:\> cd c:\download

c:\download> cpc

Now the current directory's path, "c:\download" is copied to the clipboard.

c:\download> cpc tree.jpg

Now the absolute path of the given file, "c:\download\tree.jpg" is copied to the clipboard.

Help: cpc.exe -h

Linux

cpc relies on the external command xsel to manipulate the content of the clipboard. Thus, you must install xsel using your package manager (under Ubuntu it's sudo apt install xsel).

Under Linux, there are two clipboards. They are called "primary" and "clipboard". cpc puts the path on both of them, thus you can insert the path with one of the following methods: Ctrl+v, Shift+Insert, or mouse middle click.

See the example above, it works similarly under Linux.

Help: cpc -h

Installation

cpc is written in Rust. If you have the Rust compiler, you can install it directly from crates.io using the command cargo:

$ cargo install jabba-cpc

Links

About

Copies the path of the current working dir. to the clipboard. If a parameter is given, it's also added to the path.

https://crates.io/crates/jabba-cpc

License:MIT License


Languages

Language:Rust 89.5%Language:Makefile 10.5%