Skip to main content

It's like screen's stuff command, without screen

Project description

shtuff Deploy to PyPI

Shell stuff will stuff commands into a shell à la tmux send-keys or screen stuff.

Installation

If your environment is configured to use Python 3 by default:

$ pip install shtuff

Otherwise:

$ pip3 install shtuff

Please note: shtuff only works on Python 3.7+!

Examples

In shell A, run:

$ shtuff as shell-a

In shell B, run:

$ shtuff into shell-a "git status"

Observe how shell A ran git status.

An example use case for shtuff new might be a setup script to open a couple shells automatically. Consider this script:

#!/usr/bin/env bash
termite -e "shtuff new vim" &
termite -e "shtuff new 'tail -f /var/log/somelog.log'" &

This script will open two terminals, one running vim, and one running tail.

Development

Install your local copy:

$ pip3 install -e .

Unless you know what you are doing, we highly recommend running tests inside a virtual environment. Here is how you can create and activate a virtual environment:

$ python3 -m venv .venv
$ source .venv/bin/activate

You can leave the virtual environment via deactivate:

$ deactivate

Run tests:

$ make test

Releasing

We release using Makefile, choose the relevant target:

$ make release-major
$ make release-minor
$ make release-patch

and wait for the automated deploy to PyPi!

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

shtuff-0.3.2.tar.gz (8.9 kB view hashes)

Uploaded source

Built Distribution

shtuff-0.3.2-py3-none-any.whl (5.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page