Skip to main content

Remove visual hard-wraps from terminal-copied text

Project description

clipfix

Fixes text copied from a terminal by removing visual hard-wraps.

When you copy a paragraph from a terminal (e.g. Claude Code inside VS Code), the terminal's line-wrapping gets baked into the clipboard — every line ends with a newline and continuation lines have leading spaces. clipfix strips those out and rejoins the text into clean paragraphs, while preserving real paragraph breaks and bulleted/numbered lists.

Install

pip install clipfix

macOS only — uses pbpaste / pbcopy.

Usage

  1. Copy broken text from the terminal.
  2. Run clipfix.
  3. Paste — the clipboard now contains clean text.
clipfix          # fix clipboard in-place
clipfix --test   # run self-tests

What it does

  • Merges wrapped lines within a paragraph into a single line
  • Preserves paragraph breaks (blank lines between blocks)
  • Preserves list structure — bulleted (-, *, ) and numbered (1., 2)) lists keep each item on its own line, with any wrapped continuations merged in

Example

Before (copied from terminal):

When you copy a long paragraph from a terminal, line breaks and leading
   spaces from the terminal's word-wrap get included in the clipboard.
   clipfix merges those back into clean paragraphs.

- First bullet point that wraps onto
  the next line
- Second bullet point

After running clipfix:

When you copy a long paragraph from a terminal, line breaks and leading spaces from the terminal's word-wrap get included in the clipboard. clipfix merges those back into clean paragraphs.

- First bullet point that wraps onto the next line
- Second bullet point

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clipfix-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clipfix-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file clipfix-0.1.0.tar.gz.

File metadata

  • Download URL: clipfix-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for clipfix-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2c40f191027ad9f6d6f6bbe1c88f97a9453bed20f6dea42bdd267f5c236a26fb
MD5 210a7b3e0a266a108554384e0814e44f
BLAKE2b-256 230a125163cf329c3f16d89b496175f90e4fad8d79a9aafdb05ee80be4b415ce

See more details on using hashes here.

File details

Details for the file clipfix-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: clipfix-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for clipfix-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8eae2b359004432f0a8fb856ad475a741b06b1e8c36efcf390273a24aed0834c
MD5 2f446568969c1847872c3ca01ea253ab
BLAKE2b-256 873f17226b7cf92c441613ae0d5f26d7778826d434e9eb152ac3543bed407525

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page