It's like screen's stuff command, without screen
Project description
shtuff
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
Built Distribution
File details
Details for the file shtuff-0.3.5.tar.gz
.
File metadata
- Download URL: shtuff-0.3.5.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdf96f74f97659a6156fe03827503a34099e2161742c9c215af98535f61cb14d |
|
MD5 | ebc901d4d395fee82fb7d35d7d5e9a98 |
|
BLAKE2b-256 | d0703bd14fd22341b3403f5f9d9b76d36eb15e6837342ff66f10a4af54a44d86 |
File details
Details for the file shtuff-0.3.5-py3-none-any.whl
.
File metadata
- Download URL: shtuff-0.3.5-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2960ae3236ba8d17b950b0b376b60bacc611729cd4fbdf50fd88b9f324d127dc |
|
MD5 | 98d215aaede74246f0160e7b566c24a0 |
|
BLAKE2b-256 | 1fb7e5542e26a06bee4ae6384f2929c12cec10b3243e48cb084dd49313f15410 |