grep's the env
Project description
grepenv 🔎
greps your env
About
A little tool to search through your environment.
I made grepenv
to simplify the process of calling various combinations of env | grep | sort
, and replicating my aliases for this across machines.
Installation
grepenv
can be installed using pip, but pipx is recommended:
pipx install grepenv
This installs the grepenv
shell script:
grepenv --help
ge --help # The short alias 'ge' is also available
Usage
grepenv
takes a regex pattern, and matches it against currently available environment variables.
Calling grepenv --example
will show some example usage.
$ grepenv xdg # Will find any key or value that contains the letters xdg (lower or upper case).
$ grepenv "_api_(key|token)_" --keys # finds any environment variable with this regex pattern, matching only on keys.
GITHUB_API_TOKEN=abc_NlNhalNDL78NAhdKhNAk78bdf7f
OPENAI_API_KEY=123_abcdefghijklmno
$ grepenv --find-key gitlab # Search for an environment variable with the name gitlab, and output it's value.
123_abcdefghijklmnop
# GITLAB_API_TOKEN=123_abcdefghijklmnop
$ grepenv perl --path # Search for the pattern "perl", but only in the PATH
/usr/bin/site_perl
/usr/bin/vendor_perl
/usr/bin/core_perl
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
grepenv-1.1.1.tar.gz
(8.4 kB
view details)
Built Distribution
grepenv-1.1.1-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file grepenv-1.1.1.tar.gz
.
File metadata
- Download URL: grepenv-1.1.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b8462cac0a66bd52e0e076e1c41763c2e6e2caccaaf01bbac22501a74eb048a |
|
MD5 | 6a9472bb0d42b7ecc1af0faa2281a97e |
|
BLAKE2b-256 | 441fa21fc191c7e3c6ff3e2ab56de207003123a6731e6f8fecd217a98a373336 |
File details
Details for the file grepenv-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: grepenv-1.1.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c6ad05db6d698b91a7f61cdc71308ff537f1e28a0fd863079a3355e55e80150 |
|
MD5 | 7050c174279d304ddc70d9043cf6eb36 |
|
BLAKE2b-256 | d8e78b8ccc75405f5d7e4e1bd7094e7711d1e1eeed0b22194c4970205bb9c254 |