I accidentally typed the command
export into my console emulator (running Bash) instead of
export -p, and now all the bash_completion scripts are persistently in my environment, even surviving reboot. I'd like to undo that but haven't been able to figure it out after some hours. I got as far as finding them in /etc/bash.bashrc but don't see what is sourcing that, and in any case still can't figure out how or why
export with no args can do such damage.
This is under Knoppix, in the non-root
knoppix account. When I
su - the root account has no such problem.
[update: I don't know what I'm talking about. By "environment" I meant the output of the
set Bash builtin, which was where the functions were showing. I should be using
env. Anyway, what happened was that I have been using
set in my Makefiles to test the generation of certain values, and I was surprised to suddenly see all those functions in the output. Then after reboot I checked from the command line and still saw them, not thinking to check from the Makefile (from which they no longer show, not being exported. So, problem solved; they were obviously in my
set output all along, just hadn't noticed them before until accidentally typing
export and seeing them in my
make set output. Still it seems there's a mismatch in the documentation of bash to the behavior;
export with no names is supposed to return a list of exported variables, not export everything.)]