Re: recent CVS: 'command .' permanently overrides PPs

2019-08-02 Thread Thorsten Glaser
Martijn Dekker dixit:

> One of the recent commits introduced a new bug: if a dot script is sourced 
> with
> 'command .', the positional parameters are permanently overridden by whatever
> they were at the point of sourcing, and any changes to them are ignored.

Ouch, so it’s not all that easy… thanks, fixed.

bye,
//mirabilos
-- 
[16:04:33] bkix: "veni vidi violini"
[16:04:45] bkix: "ich kam, sah und vergeigte"...


recent CVS: 'command .' permanently overrides PPs

2019-08-02 Thread Martijn Dekker
One of the recent commits introduced a new bug: if a dot script is 
sourced with 'command .', the positional parameters are permanently 
overridden by whatever they were at the point of sourcing, and any 
changes to them are ignored.


$ cat >test.mksh
set -- one two
shift
printf '[%s]\n' "$#" "$@"
$ mksh -c 'command . ./test.mksh' dummy oh dear this is not good
[6]
[oh]
[dear]
[this]
[is]
[not]
[good]

--
modernish -- harness the shell
https://github.com/modernish/modernish