reg: store the current partial word in the environment