I saw that with zsh
vared you can edit on the fly the specified environment variable. Is there an equivalent command for bash?
I'm not aware of anything that works like
However, you can define a function that'll allow you to edit an environment variable's value using e.g.
Call it as
What does it do? It creates a temporary file, writes the current value of the specified variable into the file, and opens
If the variable doesn't exist or isn't an environment variable, it will be afterwards.