https://github.com/tslmy/qevs
Quick Environment Variable Switcher
https://github.com/tslmy/qevs
bash environment-variables helper shell utility zsh
Last synced: about 2 months ago
JSON representation
Quick Environment Variable Switcher
- Host: GitHub
- URL: https://github.com/tslmy/qevs
- Owner: tslmy
- License: mit
- Created: 2022-06-04T17:37:05.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-08-11T20:47:34.000Z (11 months ago)
- Last Synced: 2025-08-11T22:19:38.812Z (11 months ago)
- Topics: bash, environment-variables, helper, shell, utility, zsh
- Language: Shell
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quick Environment Variable Switcher (Qevs)
[](https://github.com/pre-commit/pre-commit)
Provides a quick way to switch between values for environment variables.
Demo:
[](https://asciinema.org/a/bB5VxAi6AvqyBZ9ixFm4K7Nmo)
## Usage
In the directory where you prepared the `_qevs/*_options.txt` files, run `qs`.
You can type to filter for the desired option (with fuzzy matching) or click on a choice with your mouse.
If you need to set a new value that is absent in the options provided, simply enter it, and Qevs will remember it for the next time.
To unset an environment variable, just hit `esc`.
## Setup
1. Install `fzf`.
2. For each environment variable `X` that you want to switch values, create a file named `_qevs/X_options.txt`, where each line is a possible value for this variable.
### For bash, zsh, etc.
Run these lines:
```shell
curl https://raw.githubusercontent.com/tslmy/qevs/main/qevs.sh --output ~/bin/qevs.sh && chmod +x ~/bin/qevs.sh
echo 'alias qs="~/bin/qevs.sh && source /tmp/choices.sh && rm /tmp/choices.sh"' >> ~/.profile
```
### For fish
Run these lines:
```shell
curl https://raw.githubusercontent.com/tslmy/qevs/main/qevs.fish --output ~/.config/fish/functions/qs.fish
```
## License
MIT.