1 |
On Thu, Sep 13, 2012 at 2:22 AM, Ulrich Mueller wrote: |
2 |
>>>>>> On Thu, 13 Sep 2012, Mike Frysinger wrote: |
3 |
>>> Maybe it's better to add a --{save,restore} option pair: |
4 |
>>> |
5 |
>>> addwrite --save /foo/bar |
6 |
>>> # some commands writing to /foo/bar here |
7 |
>>> addwrite --restore # restore last saved state |
8 |
>>> |
9 |
>>> or --{push,pop} to allow for nested calls, but maybe that would be |
10 |
>>> overkill. |
11 |
> |
12 |
>> not sure how your --save/--restore isn't a --push/--pop already |
13 |
> |
14 |
> --save/--restore would keep one saved state (which would be |
15 |
> overwritten with the next --save), whereas --push/--pop would maintain |
16 |
> a stack. |
17 |
|
18 |
that wouldn't really be any different than if you implement the -r |
19 |
option like so: |
20 |
- `addwrite /foo` would always append the path regardless of |
21 |
existence already in the variable |
22 |
- `addwrite -r /foo` would remove exactly 1 occurence |
23 |
|
24 |
so if you don't want to do push/pop, let's stick with just adding a -r |
25 |
flag and implementing things as described above as it makes dev's |
26 |
lives simpler. |
27 |
-mike |