shed - the sh editor
Don’t run curl | sh again. Use curl | shed to verify scripts before running.
Usage
Replace sh with shed in any pipe-sh commands you run. shed will:
save the piped script to a temp file
open the temp file in $SHED_EDITOR or $EDITOR to let you view and modify the script
ask you if you still want to run the script, preserving any changes you made
Installation
This is a Python 3 script, so use pip3 to install:
pip3 install shed_sh
Note the spelling: shed_sh is different from shed.
After this, run shed or bashed from your terminal to verify it’s installed properly.
Examples
Piping to sh
Take your questionable curl-pipe-sh or wget-pipe-sh command
curl -L https://npmjs.org/install.sh | sh
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
and use shed to view and edit your script before running it:
curl -L https://npmjs.org/install.sh | shed
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | shed
Piping to bash
bashed protects your bash shell, too: take this unknown script
wget -q -O - https://fixubuntu.com/fixubuntu.sh | bash
and verify the contents before running:
wget -q -O - https://fixubuntu.com/fixubuntu.sh | bashed
Config
Set your preferred editor:
export SHED_EDITOR=vim
shed also checks $EDITOR, then falls back to nano, vim, vi, and emacs in order.
Contributions
Bug reports, fixes, or features? Feel free to open an issue or pull request any time. You can also tweet me at [@mplewis](http://twitter.com/mplewis) or email me at matt@mplewis.com.
License
Copyright (c) 2014 Matthew Lewis. Licensed under the MIT License.
Metadata
Release files for shed_sh 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shed_sh-1.0.0.tar.gz | 3.7 kB | Without provenance | Details for shed_sh-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shed_sh-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for shed_sh-1.0.0-py3-none-any.whl |
Total release size: 9.5 kB
Release files / shed_sh-1.0.0.tar.gz
| Download URL | shed_sh-1.0.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74ab9c5de29d0393c02f806201005c06d762a1a21dfa0111f748fd447d5c954f
|
|
BLAKE2b-256 checksum How to use checksums |
513dda620089f2db44f426a85225c134cbfe244ce36eb007c56addea08b7d064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / shed_sh-1.0.0-py3-none-any.whl
| Download URL | shed_sh-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f062a43831f9746f8a247ed7eeb8dc7000d85a7f65827d436edea703a0feb642
|
|
BLAKE2b-256 checksum How to use checksums |
46bb9ad0dc44f8d370faf4c368ae1333c2a4b6eb98249d4adc48646a03757c0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for shed_sh 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.