edc / bass

Make Bash utilities usable in Fish shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bass does not track unset variables

daveyarwood opened this issue · comments

I'm building some tooling around bass, and I noticed that when sourcing a bash script that unsets environment variables (e.g. for clearing sensitive information once it's no longer needed), bass does not remove the variable from the fish environment.

I'm happy to contribute a PR if needed -- I took a quick look at __bass.py, and it looks like we're taking a JSON dump of the environment before and after running the script, so it ought to just be a matter of iterating through each var in old_env that does not exist in new_env and adding set -e $var_name to the script to be sourced in the fish environment.

#48 fixes this for me when I make the change to __bass.py locally.