Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Useful aliases and shortcuts for extracting links and text from command output history in xonsh

Project description

xontrib-histcpy

Useful aliases and shortcuts for extracting links and text from command output history in xonsh.

xontrib-histcpy in action


Usage

If you use ptk(2)-prompts, histcpy will bind the follow shortcuts:

  • Alt + u: Open one of the URLs that a previous command wrote to output in your web browser
  • Alt + y: Copy one of the URLs to clipboard

The same functionality and more is available with the following command aliases (even when not using ptk):

  • getout: Copy the output of one of the last few commands to clipboard (without re-running the command - uses history)
  • cpyclip: Copy one of the last few URLs that a command wrote to stdout to clipboard (Alt+y keybinding)
  • cpyclip: Open one of the last few URLs that a command wrote to stdout in your browser (Alt+u keybinding)

Installation

Just do a

pip install xontrib-histcpy

or you can clone the repo with pip

pip install git+https://github.com/con-f-use/xontrib-histcpy

Configuration

To automatically load histcpy on startup, put

xontrib load histcpy

in your .xonshrc.

Project details


Release history Release notifications

This version

0.1

Download files

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

Files for xontrib-histcpy, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size xontrib_histcpy-0.1-py2.py3-none-any.whl (16.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size xontrib-histcpy-0.1.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page