anchor.diff:      Base1 = add_shell_macros(Base0),
       Base2 = add_shell_vars(Base1),
       #state{curr=Base2,save=Base2,base=Base2,slurp=false}.
  +
  +upd_state(Script, Args, #state{curr=Curr,save=Save,base=Base}=St) ->
  +    %% Update an environment with with script name and args.
  +    Upd = fun (E0) ->
  +                  E1 = add_vbinding('script-name', Script, E0),
  +                  add_vbinding('script-args', Args, E1)
  +          end,
  +    St#state{curr=Upd(Curr),save=Upd(Save),base=Upd(Base)}.
   
   add_shell_vars(Env0) ->
       %% Add default shell expression variables.
  
positive.code:     %% Forget everything back to before current slurp.
      unslurp(St);
  eval_form_1([run|Args], St0) ->
      {Value,St1} = run(Args, St0),
      {Value,St1};
  eval_form_1(['reset-environment'], #state{base=Be}=St) ->
      {ok,St#state{curr=Be}};
  
negative.code: %% Copyright (c) 2008-2019 Robert Virding
  %%
  %% Licensed under the Apache License, Version 2.0 (the "License");
  %% you may not use this file except in compliance with the License.
  