Provides a quick way to switch between values for environment variables.
Demo:
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
.
- Install
fzf
. - 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.
Run these lines:
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
Run these lines:
curl https://raw.githubusercontent.com/tslmy/qevs/main/qevs.fish --output ~/.config/fish/functions/qs.fish
MIT.