winpbcopy

pbcopy/paste for Windows.

View on GitHub

winpbcopy

C GitHub tag (with filter) License GitHub commits since latest release (by SemVer including pre-releases) CodeQL QA Tests Coverage Status Dependabot GitHub Pages pre-commit Stargazers WinGet Package Version CMake Prettier

@Tatsh Buy Me A Coffee Libera.Chat Mastodon Follow Patreon

An equivalent of macOS’ pbcopy and pbpaste commands.

How to build

Requirements:

Tests require CMocka. Coverage reporting requires using GCC.

Linux

Tests can be run natively on Linux if you have CMocka installed. Pass -DBUILD_TESTS=ON to CMake. Example:

mkdir build
cd build
cmake -G Ninja -DBUILD_TESTS=ON ..
ninja -v
ctest --test-dir src

Cross-compilation with MinGW

Example:

mkdir build
cd build
cmake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ ..
ninja -v

MSYS2

Example:

mkdir build
cd build
cmake -G Ninja ..
ninja

Installation

Downloads are available in the releases section.

Install to a location in PATH/${env:PATH}. The install target is usable in MSYS2 and similar environments.